If you are new to the process required to obtain OAuth 2.0 Token Credentials for making requests to a HERE service or merely wish to verify your access keys, it may be helpful to use a tool like Postman. The following is an example of utilizing the Access Keys you have obtained with your developer access or platform access. This includes generating correctly signed bearer access tokens and making a test request to a HERE service.
- Obtain and install Postman
Note: Postman v7.12.0 for Microsoft Windows was used for this example.
- Launch Postman, create and save a new Request to the HERE API OAuth 2.0 token endpoint.
- Change the HTTP method to “POST” and provide the HERE token endpoint (usually https://account.api.here.com/oauth2/token).
Select the “Authorization” tab for your request and enter the Access Key values you obtained in Developer Portal as follows:
a. Choose the signature type “OAuth 1.0”. This version is used for the signature. All other functions use the OAuth2.0 version.
Note: HERE signs OAuth 2.0 access bearer tokens for added security.
b. Ensure the option to Add authorization data to “Request Headers” is selected.
c. Enter the value for here.access.key.id in the “Consumer Key” field.
d. Enter the value for here.access.key.secret in the “Consumer Secret” field. This Access Key ID is from the file you downloaded when you created the credentials.
e. Check that HMAC-SHA256 is the selected Signature Method in the Advanced section.
- Select the “Body” tab for your request.
a. Select the radio button “x-www-form-urlencoded”.
b. Define a new Key “grant_type” with the value “client_credentials”.
- “Send” the request.
a. If the request was sent successfully, you will see the value for the access bearer token in the response.
b. This token may now be used to call supported HERE services until it expires in 86399 seconds (24 hours).
Now you are ready to make an actual request to a HERE service using the OAuth 2.0 access bearer token you just obtained. Follow these steps:
- In Postman, create and save a new Request.
- Provide the HERE service endpoint (in our example we are testing the HERE Map Tile API using this URL:
- On the Authorization tab, select Authorization type “Bearer Token” and provide the value for the OAuth 2.0 Bearer Access Token you just obtained.
- Send the request. You should see a valid response in the body. In our example, we have obtained a basemap tile image of a location in Berlin, Germany.
You have now successfully used the Access Key Credentials to make a test request to a HERE service.