Set a profile image
POST
/users/me/profile-image
users
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://trashnothing.com/api/v1.2/users/me/profile-image'
Response Response Example
200 - Example 1
{
"photo": {
"photo_id": "987-423",
"thumbnail": {
"height": 120,
"url": "https://trashnothing.com/img/2018-02-02/307731-20180119_155358.90x120.jpg",
"width": 90
}
},
"user": {
"about_me": "I used to be an accountant but then I decided to become a pirate.",
"country": "US",
"digest": "6_hours",
"digest_photos": false,
"email": {
"address": "johndoe@example.com",
"bouncing": false,
"spam_stop": false,
"verified": true
},
"firstname": "Jack",
"has_password": false,
"last_listings_view": "2018-02-15T15:04:47",
"lastname": "Carter",
"location": {
"latitude": 39.766098,
"longitude": -105.077206,
"name": "Wheat Ridge, CO, USA",
"radius'": 32186.88
},
"member_since": "2009-09-25T14:20:01",
"post_location": {
"latitude": 39.766098,
"longitude": -105.077206,
"name": "Wheat Ridge"
},
"post_reminders": true,
"profile_image": "https://gravatar.com/avatar/88305a95b05b30f6cd306019ea5d88f3?s=90&r=pg&default=identicon",
"profile_image_source": "gravatar",
"public_name": false,
"public_post_sources": [
"trashnothing"
],
"show_all_group_posts": true,
"signup": "2017-11-20T04:32:06",
"special_notices": true,
"user_id": 119458,
"username": "captainjack",
"uses_fair_offer_policy": true,
"verified": true
}
}
Request
Body Params multipart/form-data
crop
stringÂ
optional
- original_width: Original width of the photo before being cropped or rotated (in pixels).
- original_height: Original height of the photo before being cropped or rotated (in pixels).
- x: The x-coordinate of the top left corner of the cropped area.
- y: The y-coordinate of the top left corner of the cropped area.
- size: The size of the square cropped area.
- rotate: (optional) The number of degrees to rotate the image before cropping.
Currently only 90, 180 and 270 are supported which correspond to rotate left, rotate upside down and rotate right.
device_pixel_ratio
stringÂ
optional
Example:
1
photo
fileÂ
optional
photo_id
stringÂ
optional
set_default
stringÂ
optional
Example:
1
Responses
Modified at 2022-09-11 18:59:48