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 974
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

I would like to mention that my Organization name in BaaS is : SRID and Organization in APIGEE edge is : adurthisridhar-eval

will that make any difference? When i am navigating through edge to BaaS, I am able to with out any issues

I am able to access now. I did not register the product and developer apps. Thats a major miss it seems. I have gone through the documentation once again with the error msg and learned that it has to be done. Now the issue is resolved. Thank you so much to the community.

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

Yes Dino.. you are absolutely right. I am totally confused with BaaS and Edge. Now I got some clarity on usage and it is working fine now. Your video is really helpful

Thank you so much