Skip to content

Mint Service Token

POST
/api/v1/services/token
curl --request POST \
--url https://api.spartanauth.com/api/v1/services/token

Exchanges an X-Service-Secret header for a one-hour JWT that names the service. Public. The secret is not a user credential and cannot call other SpartanAuth APIs.

A successful response.

Media type application/json
object
token
string
expiresIn
string format: int64
serviceID
string
serviceName
string
sectorID
string
Example generated
{
"token": "example",
"expiresIn": "example",
"serviceID": "example",
"serviceName": "example",
"sectorID": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}