User

List users

You can retrieve a list of users in your Sendbird application using this API. You can generate a customized list using various parameter combinations.

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

get/v3/users

Request

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

Query parameters

tokenstring
limitinteger
active_mode'activated' | 'deactivated' | 'all'

Specifies the activation status of the users in the list. Acceptable values are activated, deactivated, and all. (Default: activated)

show_botboolean

Determines whether to include bots in the list. (Default: true)

user_idsstring

Specifies the user IDs. The value should be a comma-separated string that consists of multiple urlencoded user IDs. An example of a urlencoded string is ?user_ids=urlencoded_id_1,urlencoded_id_2. * The maximum number of user IDs in this parameter is 250. If you exceed the maximum number, your request may receive an HTTP 414 error indicating that the request URL is longer than what Sendbird server can interpret.

nicknamestring
nickname_startswithstring
metadatakeystring
metadatavalues_instring

Searches for blocked users with metadata containing an item with the key specified by the metadatakey parameter above, and the value of that item matches one or more values specified by this parameter. The string should be specified with multiple urlencoded metadata values separated by commas (for example, ?metadatavalues_in=urlencoded_value_1, urlencoded_value_2). This parameter should be specified in conjunction with the metadatakey above.

Headers

api-tokenstring
Example:{{API_TOKEN}}

Response

Successful response

nextstring

Example response

{
  "next": "next",
  "users": [
    {
      "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
    },
    {
      "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 response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • warning

      removed the optional property // from the response with the status

    • info

      the response's property default value was added for the status

    • breaking

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

    • breaking

      the /// response's property type changed from object to string for status

    • warning

      deleted the header request parameter Api-Token

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the new optional header request parameter api-token

    • info

      added the new enum value activated to the query request parameter active_mode

    • info

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

    • info

      added the new enum value deactivated to the query request parameter active_mode

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      the response property // became required for the status