Create

POST

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

Request

This endpoint expects an object.
act_asstringOptional

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_idstringOptional

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

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_type"urn:devrev:params:oauth:grant-type:token-issue" or "urn:ietf:params:oauth:grant-type:token-exchange"Optional
Allowed values: urn:devrev:params:oauth:grant-type:token-issueurn:ietf:params:oauth:grant-type:token-exchange

Specifies the process of obtaining a token.

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.

scopestringOptional

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_tokenstringOptional

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_hintstringOptional

A hint that identifies the token.

Response

This endpoint returns an object.
access_tokenstring

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_type"bearer"

The type of the issued token. Bearer is the only supported token type.

client_idstringOptional

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

refresh_tokenstringOptional

A token to refresh the issued token.

scopestringOptional

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