Create Auth Token
Creates a JWT corresponding to the requested token type for the authenticated user.
All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN>
as a header to every API request.
How do I find my token?
In: header
The unique ID of the Dev user or the service account to impersonate.
id
The expected audience values with respect to the token.
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.
text
The expected validity lifetime of the token in number of days. In practice, the value should be based on the usage of the token.
0 <= value <= 4294967295
Specifies the process of obtaining a token.
"urn:devrev:params:oauth:grant-type:token-issue" | "urn:ietf:params:oauth:grant-type:token-exchange"
The type of the requested token.
"urn:devrev:params:oauth:token-type:aat" | "urn:devrev:params:oauth:token-type:aat:act-as" | "urn:devrev:params:oauth:token-type:aat:public" | "urn:devrev:params:oauth:token-type:dev" | "urn:devrev:params:oauth:token-type:dev:connect" | "urn:devrev:params:oauth:token-type:gat" | "urn:devrev:params:oauth:token-type:pat" | "urn:devrev:params:oauth:token-type:pat:act-as" | "urn:devrev:params:oauth:token-type:rat" | "urn:devrev:params:oauth:token-type:rev" | "urn:devrev:params:oauth:token-type:session" | "urn:devrev:params:oauth:token-type:session:dev0" | "urn:devrev:params:oauth:token-type:session:onetime" | "urn:devrev:params:oauth:token-type:session:rev:act-as" | "urn:devrev:params:oauth:token-type:super" | "urn:devrev:params:oauth:token-type:sys" | "urn:ietf:params:oauth:token-type:jwt"
Carries info corresponding to the Rev user to be provisioned and/or issue a Rev session token.
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.
text
Represents the entity that requests the token. Not required when requesting an application access token (AAT).
text
The type of the subject token.
"urn:devrev:params:oauth:token-type:jwt:auth0" | "urn:devrev:params:oauth:token-type:jwt:dev" | "urn:devrev:params:oauth:token-type:rat" | "urn:devrev:params:oauth:token-type:rev" | "urn:devrev:params:oauth:token-type:revinfo" | "urn:devrev:params:oauth:token-type:session" | "urn:devrev:params:oauth:token-type:sysu" | "urn:devrev:params:oauth:token-type:userinfo" | "urn:ietf:params:oauth:token-type:jwt"
A hint that identifies the token.
text
Response Body
curl -X POST "https://api.devrev.ai/auth-tokens.create" \ -H "Content-Type: application/json" \ -d '{}'
{
"access_token": "string",
"client_id": "string",
"expires_in": 0,
"refresh_token": "string",
"scope": "string",
"token_type": "bearer"
}
{
"detail": "string",
"message": "string",
"type": "artifact_already_attached_to_a_parent",
"existing_parent": "string",
"is_same": true
}
{
"detail": "string",
"message": "string",
"type": "unauthenticated"
}
{
"detail": "string",
"message": "string",
"type": "forbidden"
}
{
"detail": "string",
"message": "string",
"type": "conflict"
}
{
"detail": "string",
"message": "string",
"type": "too_many_requests",
"retry_after": 0
}
{
"detail": "string",
"message": "string",
"type": "internal_error",
"reference_id": "string"
}
{
"detail": "string",
"message": "string",
"type": "service_unavailable"
}