User

Create a user

You should create a user in your Sendbird application to initiate conversations in channels. A user is identified by its unique user ID, and additionally have a changeable nickname, profile image, and so on. Users are at the core of all conversations. Sendbird applications are made up of users who chat in either Open Channels or Group Channels. Using this API, it is possible to have fine grained control over your users and what those users can do. To learn more about users, see User overview.

https://sendbird.com/docs/chat/platform-api/v3/user/creating-users/create-a-user#1-create-a-user

post/v3/users

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

discovery_keysstring[] nullable
issue_access_tokenboolean
metadataobject nullable
nicknamestring nullable required
profile_filestring binary

Specifies the file of the user's profile image. An acceptable image is limited to a JPG, JPEG, or PNG file of up to 5 MB. When passing a file, you should send a multipart request. If the profile_file property is specified, the profile_url property is not required.

profile_urlstring required
user_idstring required

Response

Successful response

access_tokenstring
created_atinteger
discovery_keysstring[] nullable
has_ever_logged_inboolean
is_activeboolean
is_hide_me_from_friendsboolean
is_onlineboolean
is_shadow_blockedboolean
last_seen_atinteger
localestring
metadataobject nullable
nicknamestring nullable
preferred_languagesstring[] nullable
profile_urlstring
require_auth_for_profile_imageboolean
user_idstring required
state'' | 'invited' | 'joined' nullable
unread_channel_countinteger
unread_message_countinteger
phone_numberstring
is_createdboolean

Example response

{
  "metadata": "{}",
  "is_active": true,
  "preferred_languages": [
    "preferred_languages",
    "preferred_languages"
  ],
  "require_auth_for_profile_image": true,
  "unread_channel_count": 6,
  "discovery_keys": [
    "discovery_keys",
    "discovery_keys"
  ],
  "profile_url": "profile_url",
  "is_created": true,
  "created_at": 9,
  "has_ever_logged_in": true,
  "locale": "locale",
  "unread_message_count": 8,
  "access_token": "access_token",
  "is_shadow_blocked": true,
  "user_id": "user_id",
  "nickname": "nickname",
  "phone_number": "phone_number",
  "is_online": true,
  "state": "",
  "is_hide_me_from_friends": true,
  "last_seen_at": 9
}

Changes

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property default value was added

    • warning

      deleted the header request parameter Api-Token

    • info

      api operation id createUser removed and replaced with createAUser

    • info

      added the new optional header request parameter api-token