Authenticate your backend
POST/oauth/token
Use this endpoint to get a medium-lived JWT access token for your backend to perform calls the Server API exposed by Nabla. See the Authentication guide for details on how to construct the client assertion.
Request
Responses
- 200
A JWT access token that can be used to access the server API.
Operation spec
{
"method": "post",
"path": "/oauth/token",
"operationId": "oauth-generate-server-access-token",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"grant_type": {
"type": "string",
"description": "This endpoint only supports the 'client_credentials' value.",
"example": "client_credentials"
},
"client_assertion_type": {
"type": "string",
"description": "This endpoint only supports the 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' value.",
"example": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
},
"client_assertion": {
"type": "string",
"description": "A short-lived JWT assertion that serves to authenticate this request."
}
},
"required": [
"grant_type",
"client_assertion_type",
"client_assertion"
]
}
}
}
},
"responses": {
"200": {
"description": "A JWT access token that can be used to access the server API.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "An authentication token using the JWT serialization format. JWT tokens contain varying data (depending on their intended use) and use a signature to guarantee their authenticity.",
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMTIzNDU2Nzg5MCIsIm5hbWUiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.v5qdy8w9Ygs5fdic9a1LuX76PUdx3omYd5GlDTAF3Ug",
"title": "jwt_token"
},
"expires_in": {
"type": "integer",
"description": "The lifetime of the access token, in seconds."
}
},
"required": [
"access_token",
"expires_in"
]
}
}
}
}
}
}