Skip to Content
GEMMGetting StartedAuthentication
1

Getting Keys

To Get Started with Mobility APIs

Your application must send an API token in the header of every API request. API uses the OAuth2 “client credentials” grant type, and requires that the API client_id andclient_secret are Base64 encoded.

  1. Read the documentation on what APIs are available.
  2. Contact customer support for your API credentials.
  3. Get API token information.

Notes

  • API credentials are machine credentials, not people credentials. Your company only needs one set of API credentials, not a set for every developer.
  • If your company has different API credentials for every developer, you need to notify your Account Representative to delete old credentials when a developer leaves the company.
  • API credentials can only be used by your application to log in through the APIs.
  • You cannot use portal credentials with the APIs, and you can’t use API credentials to access the portals.
  • API credentials do not expire.
2

Getting Auth Token

Get an API Token

1. Encode your credentials

Concatenate the key and the secret with a colon between them, like this: client_id:client_secret. Then encode the entire string in Base64 format. (To learn more about encoding in Base64 format, visit https://www.rfc-editor.org/info/rfc4648/.)

2. Request a token

Send a POST request to okta.granitenet.com with the encoded string in the header.

3

Using the Token

Use the Token

The response contains an access_token and an expires_in value, the token lifetime in seconds. Reuse the token until it expires, then request a new one.

Send these headers with every API request:

  • Authorization: Bearer ACCESS_TOKEN, with the token you received.
  • macnum, the Macnum of your organization’s top-level account.
  • Content-Type: application/json when the request has a body.

If a request is rejected for access reasons, check the response:

  • 401 with an error body (Unauthorized): the token is missing, invalid or expired.
  • 401 with an empty body: the macnum header is not allowed for your token.
  • 403 REQUEST_FAILED.Forbidden: the account in the request is not one you have access to, or does not belong to the macnum you sent.
Last updated on