Upload your profile picture
const url = 'https://api.gampeon.com/v1/me/avatar';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/png'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.gampeon.com/v1/me/avatar \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: image/png' \ --data binaryPNG, JPEG or WebP up to 2 MB, no animation. The server removes all metadata (EXIF including GPS position, XMP, IPTC, comments, embedded thumbnails) and gives the file a new random name. Replacing an image deletes the old one. At least 128×128 pixels, roughly square (crop before uploading).
Not available with access tokens.
Rate limit: 30 uploads per hour per account.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The image
Responses
Section titled “Responses”Stored and set as the current image
object
Image path relative to the API (/v1/media/…)
Example generated
{ "url": "example", "width": 1, "height": 1}Error codes: invalid_image, upload_incomplete
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: length_required
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: file_too_large
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unsupported_media_type, invalid_image, animated_image
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: image_too_small, invalid_aspect_ratio
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 30 uploads per hour per account. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: storage_disabled
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}