Create JWT
POST/auth/v1/jwt
To create a JWT use your project's Service Account JWT to authenticate and authorize the request.
The 'kid' you supply must exist and will be used to sign the JWT. You can create a new KID by creating a new JWK in your dashboard.
Do not use the 'kid' of your project's Service Account JWT unless you want to give the JWT created access to your project.
Generate JWTRequest
- application/json
Body
required
JWT options
Key ID of the JWK
ttl stands for time to live, a ttl of 300 will expire in 300 seconds. Either ttl or exp should be used but not both
600
The JWT will no longer be valid after this date. Either ttl or expire should be used but not both
The JWT will not be valid before this date
The subject of the JWT (the user id)
An array of roles that will be applied to the JWT. This will apper in the JWT as the claim roles
An array of permissions that will be applied to the JWT.
The permissions are a string representation of a uint64 bitmask.
This will appear in the JWT as the claim prm
claims
object
Additional claims to be stored with the JWT
Additional claims to be stored with the JWT
{}
Responses
- 201
- 400
- 401
- 403
- 500
JWT
- application/json
- Schema
- Example (from schema)
Schema
{
"token": "string"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Error message for the end user
Code that can be set that supplies a specific reason for why a request failed
invalidFields
object[]
Specific error scoped to a field
Internal user only
{
"message": "string",
"errorCode": "string",
"invalidFields": [
{
"name": "string",
"reason": "string",
"errorCode": "string"
}
],
"internal": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Error message for the end user
Code that can be set that supplies a specific reason for why a request failed
invalidFields
object[]
Specific error scoped to a field
Internal user only
{
"message": "string",
"errorCode": "string",
"invalidFields": [
{
"name": "string",
"reason": "string",
"errorCode": "string"
}
],
"internal": "string"
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Error message for the end user
Code that can be set that supplies a specific reason for why a request failed
invalidFields
object[]
Specific error scoped to a field
Internal user only
{
"message": "string",
"errorCode": "string",
"invalidFields": [
{
"name": "string",
"reason": "string",
"errorCode": "string"
}
],
"internal": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Error message for the end user
Code that can be set that supplies a specific reason for why a request failed
invalidFields
object[]
Specific error scoped to a field
Internal user only
{
"message": "string",
"errorCode": "string",
"invalidFields": [
{
"name": "string",
"reason": "string",
"errorCode": "string"
}
],
"internal": "string"
}