Upload Avatar
POST api/account/avatar/upload
Upload the user’s avatar
Example Request
curl -X 'GET' \ 'http://localhost:8080/api/account/avatar/upload' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' -F "avatar_file=@/path/to/your/image.jpg"Paramaters
avatar_file
Type: Form Data
Data Type: File
Required: Yes
Description: The user’s avatar file. Supports all image file extensions.
Responses
200 - OK
The request was successful
Content Type: application/json
Content:
{ "user_id": 0, "user_avatar_url": "string"}400 - Bad Request
Validation Error
Content Type: application/json
Content:
{ "param_name": [ "string" ]}401 - Unauthorized
The request requires valid bearer token, but none were provided, or the bearer token is invalid.
429 - Too Many Requests
The user has exceeded the rate limit of 5 requests per minute.
500 - Internal Server Error
There is an issue with the backend. Sentry will provide a more detailed report on the problem.