How to use Risk Cloud's API to create or retrieve an API Access Token
The Risk Cloud API uses OAuth 2.0 for authentication which uses a bearer token in the Authorization http header. In order to start using the API, first retrieve your Client and Secret keys from the Profile page. This can be navigated to by clicking the Person icon in the top right corner and then the Profile button.
In the Profile page, go to the "Access Key" tab. If this tab is not there, please contact your Risk Cloud administrator as you may not have API privileges.
In the "Access Key" tab you will see both Client and Secret keys. These are both necessary to generate an access key or retrieve an existing access key.
*Note that this panel also has the ability to generate the Access Key on its own.
After having both Client and Secret keys they will need to be base64 encoded with a colon in between them: CLIENT:SECRET
.
Please note that you should be base64 encoding the CLIENT:SECRET together a single time; not the CLIENT first and then the SECRET second.
Once they are encoded, take your encoded string and place it in the authorization header as Authorization: Basic ENCODED
.
URL: /api/v1/account/token
Request Method: POST
Once this URL is pinged with the correct Authorization Header a JSON response will appear mimicking the following structure:
{
"access_token": "KEY_HERE",
"token_type": "bearer",
"expires_in": 31532918,
"scope": "read write"
}
The returned access token can then be used in the authorization header to interact with Risk Cloud's API
Authorization: Bearer ACCESS_TOKEN
Comments
0 comments
Please sign in to leave a comment.