3

I have an API which requires a API key to get through. I have set the same verification policy to my set of API's. However, some of my API's work and the other do not work giving me the below error. What might be the cause.

{
    fault: {
        faultstring: "Invalid ApiKey for given resource"
        detail: {
            errorcode: "oauth.v2.InvalidApiKeyForGivenResource"
        }
    }
}
brandonscript
  • 68,675
  • 32
  • 163
  • 220
ZZzzZZzz
  • 1,800
  • 3
  • 29
  • 51
  • 1
    You need to make sure you've assigned the proxy to the product - chances are you haven't connected the two. – brandonscript Feb 26 '15 at 20:42
  • 1
    Thank you @remus. I have setup the verify API key policy on the PreFlow. Later add some API's for which the verifyAPI policy was not working. I have removed the policy and attached the API's and later added the policy which removed the error. – ZZzzZZzz Feb 26 '15 at 21:14

1 Answers1

3

One of the possible reasons for the error "Invalid ApiKey for given resource" is that the Product associated with the API proxy may not have the proper "Resource Path.

The below apigee community link explains this issue in more detail and what should the Resource Path be set as to make different paths in your APIs to work: https://community.apigee.com/questions/965/need-to-know-about-in-resource-path.html

Amar
  • 46
  • 2