Create Auth Token

Creates a JWT corresponding to the requested token type for the authenticated user.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
act_asstringOptionalformat: "id"
The unique ID of the Dev user or the service account to impersonate.
audlist of stringsOptional
The expected audience values with respect to the token.
client_idstringOptionalformat: "text"

An identifier that represents the application which is requesting the token. If no client_id is present in the request to generate an application access token (AAT), DevRev will generate a client_id. This client_id is only associated with an AAT.

expires_inintegerOptional>=0<=4294967295
The expected validity lifetime of the token in number of days. In practice, the value should be based on the usage of the token.
grant_typeenumOptional
Specifies the process of obtaining a token.
Allowed values:
requested_token_typeenumOptional
The type of the requested token.
rev_infoobjectOptional

Carries info corresponding to the Rev user to be provisioned and/or issue a Rev session token.

scopestringOptionalformat: "text"

The requested set of scopes associated with the issued token. A space-delimited list of values in which the order of values does not matter.

subject_tokenstringOptionalformat: "text"

Represents the entity that requests the token. Not required when requesting an application access token (AAT).

subject_token_typeenumOptional
The type of the subject token.
token_hintstringOptionalformat: "text"
A hint that identifies the token.

Response

Response for the request to create a new token corresponding to the requested token type.
access_tokenstringformat: "text"

The issued JSON Web Token (JWT) corresponding to the requested token type.

expires_inlong
The validity lifetime of the token specified in seconds since Unix epoch.
token_typeenum
The type of the issued token. Bearer is the only supported token type.
Allowed values:
client_idstring or nullformat: "text"

An identifier that represents the application which is requesting the token. Only present in a response corresponding to an application access token (AAT).

refresh_tokenstring or nullformat: "text"
A token to refresh the issued token.
scopestring or nullformat: "text"

The scopes associated with the issued token. A space-delimited list of values in which the order of values does not matter.

Errors