Search + K

Command Palette

Search for a command to run...

Sign In

users_setPhoto

POST /users.setPhoto
Copy endpoint
https://slack.com/api

Set the user profile photo

Request Body

application/x-www-form-urlencoded required
{
crop_w?: string;
crop_x?: string;
crop_y?: string;
image?: string;
token: string;
}

Responses

200 application/json

Typical success response

{ ok: DefsOkTrue
type DefsOkTrue = true
;profile: {
avatar_hash: string;
image_1024: string;
image_192: string;
image_24: string;
image_32: string;
image_48: string;
image_512: string;
image_72: string;
image_original: string;
}
; }
default application/json

Typical error response

{
callstack?: string;
debug_step?: string;
dims?: string;
error: "bad_image" | "too_large" | "too_many_frames" | "not_found" | "not_authed" | "invalid_auth" | "account_inactive" | "token_revoked" | "no_permission" | "org_login_required" | "user_is_bot" | "invalid_arg_name" | "invalid_array_arg" | "invalid_charset" | "invalid_form_data" | "invalid_post_type" | "missing_post_type" | "team_added_to_org" | "invalid_json" | "json_not_object" | "request_timeout" | "upgrade_required" | "fatal_error";
ok: DefsOkFalse
type DefsOkFalse = false
;
time_ident?: number;
}