Skip to content

Oauth2 Access Token

Request oauth2 access token

Request

Facilitates the acquisition of an OAuth2 access token. It requires either a basic authorization header or a client_id provided in the request body.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Query
client_idstring

The Zephr site's Oauth2 client ID.

Example:client_id=client_id=1234567890
Headers
authorizationstring

Encoded basic authorisation header that includes Zephr Site Oauth2 Client ID.

Example:Authorization: Basic ZGVtbzpwQDU1dzByZA==
cURL
curl -i -X POST \
  'https://demo-site/zephr/oauth2/token?client_id=client_id%3D1234567890' \
  -H 'authorization: Authorization: Basic ZGVtbzpwQDU1dzByZA==' \
  -b blaize_session=YOUR_API_KEY_HERE

Responses

OK

Headers
any
Bodyapplication/json
access_tokenstring

Oauth2 access token

token_typestring
expires_innumber

Oauth2 token expiry time in seconds

refresh_tokenstring

Oauth2 refresh token to reuest a new Oauth2 token

user_idstring

Authenticated user ID

Response
{ "access_token": "string", "token_type": "string", "expires_in": 0, "refresh_token": "string", "user_id": "string" }