User

Create user token

Changed on

Create user token

This action issues a session token for user authentication. Session tokens provide an efficient stateless authentication method by not storing the tokens in the Sendbird database, and thus improving the server's performance. See access token vs. session token to learn more about authenticating users.

Note: The endpoint /users/{user_id} is deprecated. Use /users/{user_id}/token for greater efficiency.

https://sendbird.com/docs/chat/platform-api/v3/user/managing-session-tokens/issue-a-session-token#1-issue-a-session-token

post/v3/users/{user_id}/token

Request

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

Path parameters

user_idstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

expires_atinteger

Response

Successful response

expires_atinteger
tokenstring

Example response

{
  "expires_at": 0,
  "token": "token"
}

Changes

    • breaking

      the request property type changed from number to integer, and format from no format to int64

    • warning

      deleted the header request parameter Api-Token

    • info

      added the new optional header request parameter api-token

    • info

      the header request parameter Api-Token became optional