Pages

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 3.0

All requests to the Graniitti API must be authenticated. The API uses token-based authentication over HTTPS. Requests that are not authenticated or that are sent over plain HTTP always fail.

Authenticating a request

To authenticate a request, add your personal access token to the request using the Authorization header, and prefix the token with "Bearer" followed by a space, as shown in the following example.

Code Block
languagepowershell
themeRDark
curl -X GET \
--header 'Authorization: Bearer <access_token>' \
'https://<graniitti_api_domain>/v0/users'

If you do not already have a token, get it from the Frosmo Control Panel. You can also recreate or revoke an existing token.

Getting your personal access token

To get your personal access token:

  1. In the Control Panel, select Utilities > Graniitti API.
  2. Click Create token.

    Getting your personal access tokenImage Added

  3. Copy the token. It will not be shown on the page again.

    Getting your personal access tokenImage Added

You now have your personal access token for authenticating with the Graniitti API.

Recreating your personal access token

If you forget your personal access token, or if you need a new one for some other reason, you can recreate the token.

Warning
Recreating the token renders your previous token invalid. If you have applications that use the previous token, their Graniitti API requests will no longer work after you recreate the token.

To recreate your personal access token:

  1. In the Control Panel, select Utilities > Graniitti API.
  2. Click Recreate token.

    Recreating your personal access tokenImage Added

  3. Copy the token. It will not be shown on the page again.

You have recreated your personal access token. Use the new token in place of the old one in all Graniitti API requests.

Revoking your personal access token

If you no longer need your personal access token, you can revoke it.

Warning
Revoking the token renders it invalid. If you have applications that use the token, their Graniitti API requests will no longer work after you revoke the token.

To revoke your personal access token:

  1. In the Control Panel, select Utilities > Graniitti API.
  2. Click Revoke token.

    Revoking your personal access tokenImage Added

You have revoked your personal access token and can no longer use it to authenticate Graniitti API requests.