Application tokens are credentials used to exchange for access tokens in order to communicate securely with the Reekoh API. With its revocable nature and ability to hide user credentials, application tokens provide better security for API access.
To access Reekoh API, perform the following steps:
Note: For the purpose of this article, we will be using Postman in communicating with the Reekoh API.
- Using the ID and Secret key of the application token you created, obtain a bearer token, which will be used in accessing the Reekoh API. Refer to the screenshot below for a sample request using Postman:
- A - Make sure that POST method is selected.
- B - Enter the URL of the same environment where the application token is created then append /auth/token. In the example above, the environment used is us-w.
- C - Select Body then select raw.
- D - Change Text to JSON.
- E - Enter the following data in JSON format:
- token - Application token ID.
- secret - Application token Secret key.
- Click Send to complete your request. If request is successful, the bearer token will be displayed as idToken in the Response section in Postman.
- Using the bearer token you obtained, you can now access the Reekoh API. Note that the bearer token expires within 30 minutes.
For example:
You want to get all the registered devices in the us-w Platform. In order to do this, you need to connect to Devices-API. Refer to the screenshot below for a sample on how to connect to Devices-API using Postman.
- A - Make sure that GET method is selected.
- B - Enter the URL of the same environment where the application token is created then append the name of the API you want to connect to.
- C - Add the following headers:
- Content-Type - Value should be application/json. Note that by default, this header is automatically added.
- Authorization - Value should be the bearer token.
After sending the request, the result will be displayed in the Response section in Postman:
Back to Top | < Previous | Next > |
Comments
0 comments
Please sign in to leave a comment.