Authorization API

About

API version:

The Authorization API allows you to authorize your API calls. It is required that you retrieve a valid access token for all calls to the account APIs. Public APIs do not require authorization.

The diagram below shows the authorization flow for the account APIs:

Authorization flow
Usage

You need client credentials. If you have not already generated client credentials, sign into your acccount and generate them.

Send a POST request to /api/auth/token with the following raw body content:

Example - cURL:

Example - PowerShell:

Results
Name Type Description
status string The status of the request.
'OK' is a good request.
'SYSTEM_ERROR' means that your token failed to be generated. Try the request again.
'MISSING_CREDENTIALS' means that you did not supply a client_id and/or client_secret in the raw body. 'INVALID_CREDENTIALS' means that the credentials you supplied are invalid.
'REVOKED_CREDENTIALS' means that you supplied valid credentials that have been revoked and can no longer be used.
'INVALID_GRANT_TYPE' means that the grant type you specified is invalid. Should be 'client_credentials'.
token JSON object The details for the access token to be used in subsequent API calls.
token.access_token string The access token.
token.token_type string The type of token, e.g., 'bearer'.
token.expires_in integer The number of seconds until the token expires.
Sample Output
GET
https://networkcalc.com/api/auth/token