Validate a token
GET
/v1/auth/validate
const url = 'https://api.nextpki.com/v1/auth/validate';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nextpki.com/v1/auth/validate \ --header 'Authorization: Bearer <token>'Confirms the token and reports the tenant and scopes it carries. Requires no particular scope - use it as a health check for credentials.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Token is valid
Media typeapplication/json
object
valid
boolean
tenant_id
string format: uuid
name
string
scopes
Array<string>
Examplegenerated
{ "valid": true, "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "scopes": [ "example" ]}Missing, malformed, unknown or revoked token
Media typeapplication/json
object
error
string
Examplegenerated
{ "error": "example"}