https://networkcalc.com/api/auth/token
Get an access token to use in API calls that require authorization.
curl -X POST https://networkcalc.com/api/auth/token \
--header "Content-Type: application/json" \
--data '{
"client_id": "12345",
"client_secret": "abcde",
"grant_type": "client_credentials"
}'
{
"status": "OK",
"token": {
"access_token": "7bcm9RQC7PCLJS6JmxVhTMOnDUnXSioVw3aAbvityfhrf5tB5bOoViA6tSkwnKKn",
"token_type": "bearer",
"expires_in": 3600
}
}
Request Headers
Content-Typeapplication/json
Request Body
Response Format
Response Codes
200
OK - Success.401
MISSING_CREDENTIALS - The request body is missing client_id, client_secret, or both.401
CREDENTIALS_NOT_FOUND - The credentials supplied are not valid.401
INVALID_CREDENTIALS - The credentials supplied are not valid.401
REVOKED_CREDENTIALS - The credentials supplied have been reboked and can no longer be used.401
INVALID_GRANT_TYPE - The grant_type supplied is invalid. Should be client_credentials.401
INVALID_GRANT - The access token supplied is invalid or another error occured.