Reputation: 51059
I am trying to access HERE API example with JetBrains with HTTP files. When I write request this way
GET https://discover.search.hereapi.com/v1/discover?at=52.5228,13.4124&q=petrol+station&limit=5
Authorization: Bearer {{API_KEY}}
I am getting an error
{
"error": "Unauthorized",
"error_description": "Token Validation Failure - unrecognized kid null"
}
And while I am accessing with
GET https://discover.search.hereapi.com/v1/discover?apiKey={{API_KEY}}&at=52.5228,13.4124&q=petrol+station&limit=5
I am getting a normal answer.
Why? Is it just wrong documentation?
Upvotes: 0
Views: 774
Reputation:
Please use your bearer token generated from OAUTH, you can check this post to generate the bearer token from postman or with Python.
https://discover.search.hereapi.com/v1/discover?at=52.5228,13.4124&q=petrol+station&limit=5
Authorization: Bearer {Use your Bearer access token}
Upvotes: 2
Reputation: 96
When you use "Authorization: Bearer" method don't use API_KEY, but YOUR_TOKEN that you get from OAUTH, more info in documentation https://developer.here.com/documentation/authentication/dev_guide/topics/request-constructing.html
Upvotes: 1