Created an app manually via the Edge website.
The API proxy requires an API key to be provided by the callers.
When I use the Consumer Key of the app that I created I'm getting this error:
{"fault":{"faultstring":"Invalid ApiKey for given resource","detail":{"errorcode":"oauth.v2.InvalidApiKeyForGivenResource"}}}
Why does it say anything about OAuth? It was supposed be a regular apikey verification via the Query String
Solved! Go to Solution.
It's a silly mistake !! You have defined access to /shippingCalculator resource inside the API & You are calling api without the above resource name.
Instead of ,
https://freightos-dev.apigee.net/estimator?apikey=t8VZHGAHtcccIkTGE54w75jUxKWAoLG3
Isn't it ,
Hope it helps 🙂
Checked further, I'm supposed to receive this error in this case - this is not what's happening.
What's going on?
InvalidApiKeyForGivenResource | 401 | An API key was received by Edge, and it is valid; however, it does not match an approved key in the Developer App associated with your API proxy through a Product. |
Here's the proof that they App key and the Product are "Approved".
Still the calls like:
https://freightos-dev.apigee.net/estimator?apikey=t8VZHGAHtcccIkTGE54w75jUxKWAoLG3
or
https://freightos-test.apigee.net/estimator?apikey=t8VZHGAHtcccIkTGE54w75jUxKWAoLG3
or
https://freightos-prod.apigee.net/estimator?apikey=t8VZHGAHtcccIkTGE54w75jUxKWAoLG3
Result in:
{"fault":{"faultstring":"Invalid ApiKey for given resource","detail":{"errorcode":"oauth.v2.InvalidApiKeyForGivenResource"}}}
It's a silly mistake !! You have defined access to /shippingCalculator resource inside the API & You are calling api without the above resource name.
Instead of ,
https://freightos-dev.apigee.net/estimator?apikey=t8VZHGAHtcccIkTGE54w75jUxKWAoLG3
Isn't it ,
Hope it helps 🙂