User

View a user

You can retrieve information about a user using this API.

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

user_id
Type: string
Description: Specifies the unique ID of the user to retrieve.

get/v3/users/{user_id}

Request

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

Path parameters

user_idstring required

(Required)

Query parameters

include_unread_countboolean
custom_typesstring
super_mode'all' | 'super' | 'nonsuper'

Restricts the search scope to retrieve only Supergroup or non-Supergroup channels. Acceptable values are all, super, and nonsuper. This parameter should be specified in conjunction with include_unread_count above. (Default: all)

Headers

api-tokenstring
Example:{{API_TOKEN}}

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

    • breaking

      the query request parameter super_mode was restricted to a list of enum values

    • warning

      deleted the header request parameter Api-Token

    • info

      api operation id viewUserById removed and replaced with viewAUser

    • info

      added the new optional header request parameter api-token

    • info

      added the new enum value all to the query request parameter super_mode

    • info

      added the new enum value nonsuper to the query request parameter super_mode

    • info

      added the new enum value super to the query request parameter super_mode

    • info

      the header request parameter Api-Token became optional