Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to validate API Key with Verify APIKey policy

Hi,

I am new to APIGEE and started using Verify APIKey policy in my learning proxy. In BaaS, I can see that API credentials are assigned and when i am using the same in my queryparm, i am getting the below error

{"fault":{"faultstring":"Invalid ApiKey","detail":{"errorcode":"oauth.v2.InvalidApiKey"}}}

i am using a simple VerifyAPIKey policy as below

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <VerifyAPIKey async="false" continueOnError="false" enabled="true" name="Verify-API-Key-1"> <DisplayName>Verify API Key-1</DisplayName> <Properties/> <APIKey ref="request.queryparam.apikey"/> </VerifyAPIKey>

can anyone help me to fix this issue? Am I doing anything wrong? do i need to have approved api key? May be question is a basic but please feel free to correct me.

Thanks

Sridhar A

Solved Solved
1 4 1,243
1 ACCEPTED SOLUTION

Thanks for your description of the policy.

I'm sorry, I think you have some confusion about the BaaS product and Apigee Edge. BaaS is .... a separate thing. So if you copy/paste credentials out of the BaaS UI, and try to use them with an API Proxy in Apigee Edge, it won't work. The API Keys that can be verified in Apigee Edge must be generated within Apigee Edge.

You need to provision a product, a developer, and an app. Then get the key from the app, and use THAT.

Here's a quick video demonstration.

5948-screenshot-20171116-162729.png

View solution in original post

4 REPLIES 4