Update a user
PUT {{baseUrl}}/v3/users/:user_id
Update a user
Updates information on a user. In addition to changing a user's nickname or profile image, you can issue a new access token for the user. The new access token replaces the previous one as the necessary token for authentication.
You can also deactivate or reactivate a user. If the leave_all_when_deactivated
is true (which it is by default), a user leaves all joined group channels when deactivated.
https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-a-user
Request Body
{"user_id"=>"<string>", "nickname"=>"<string>", "profile_url"=>"<string>", "profile_file"=>"<binary>", "issue_access_token"=>"<boolean>", "issue_session_token"=>"<boolean>", "session_token_expires_at"=>"<integer>", "is_active"=>"<boolean>", "last_seen_at"=>"<integer>", "discovery_keys"=>["<string>", "<string>"], "preferred_languages"=>["<string>", "<string>"], "leave_all_when_deactivated"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Api-Token | string | (Required) | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"require_auth_for_profile_image":"\u003cboolean\u003e","is_online":"\u003cboolean\u003e","user_id":"\u003cstring\u003e","access_token":"\u003cstring\u003e","has_ever_logged_in":"\u003cboolean\u003e","is_active":"\u003cboolean\u003e","last_seen_at":"\u003cinteger\u003e","nickname":"\u003cstring\u003e","discovery_keys":["\u003cstring\u003e","\u003cstring\u003e"],"session_tokens":["\u003cstring\u003e","\u003cstring\u003e"],"preferred_languages":["\u003cstring\u003e","\u003cstring\u003e"],"profile_url":"\u003cstring\u003e","created_at":"\u003cinteger\u003e","phone_number":"\u003cstring\u003e","local":"\u003cstring\u003e","locale":"\u003cstring\u003e","is_hide_me_from_friends":"\u003cboolean\u003e","is_shadow_blocked":"\u003cboolean\u003e","is_created":"\u003cboolean\u003e","metadata":{"constructor":{"arguments":{},"caller":{"value":"\u003cCircular reference to #/components/schemas/Function detected\u003e"},"length":"\u003cnumber\u003e","prototype":{}}},"description":"\u003cstring\u003e","end_at":"\u003cnumber\u003e","start_at":"\u003cnumber\u003e"}