Create authentication token

post/createauthtoken

Creates an authentication token for the authenticated user. These are specifically intended to be used with the Web SDK.

Note: The tokens generated from this endpoint are not valid tokens for use with the Client API (e.g. /rest/api/v1/*).

SecurityBearerAuth
Request
header Parameters
X-Glean-ActAs
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

Responses
200

OK

Response Schema: application/json
expirationTime
required
integer <int64>

Unix timestamp for when this token expires (in seconds since epoch UTC).

token
required
string

An authentication token that can be passed to any endpoint via Bearer Authentication

400

Invalid Request

401

Not Authorized

429

Too Many Requests

Request samples
Response samples
application/json
{
  • "token": "string",
  • "expirationTime": 0
}