Users

Users Set Photo

POST
/users.setPhoto

Set the user profile photo

Authorization

slackAuth users.profile:write
AuthorizationBearer <token>

In: header

Scope: users.profile:write

Header Parameters

Content-Type*"application/x-www-form-urlencoded"

Value in

  • "application/x-www-form-urlencoded"

Request Body

application/x-www-form-urlencoded

token*string

Authentication token. Requires scope: users.profile:write

crop_w?string

Width/height of crop box (always square)

crop_x?string

X coordinate of top-left corner of crop box

crop_y?string

Y coordinate of top-left corner of crop box

image?string

File contents via multipart/form-data.

Response Body

application/json

application/json

curl -X POST "https://example.com/users.setPhoto" \  -H "Content-Type: application/x-www-form-urlencoded" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'token=string'
{  "ok": "True",  "profile": {    "avatar_hash": "string",    "image_1024": "http://example.com",    "image_192": "http://example.com",    "image_24": "http://example.com",    "image_32": "http://example.com",    "image_48": "http://example.com",    "image_512": "http://example.com",    "image_72": "http://example.com",    "image_original": "http://example.com"  }}