Introspect Service Token
POST
/api/v1/services/introspect
const url = 'https://api.spartanauth.com/api/v1/services/introspect';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.spartanauth.com/api/v1/services/introspect \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Checks a service JWT. Returns the service id, name, and sector when the signature is valid and the service still exists. Does not accept user JWTs. Public.
Request Body
Section titled “Request Body ” Media type application/json
object
token
string
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
serviceID
string
serviceName
string
sectorID
string
exp
string format: int64
iat
string format: int64
Example generated
{ "serviceID": "example", "serviceName": "example", "sectorID": "example", "exp": "example", "iat": "example"}default
Section titled “default ”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" } ]}