Hello,
I have 2 environments (DEV and DEV DMZ), I created an ApiProxy with Oauth2 that is deployed only in one of the environments.
I created an APP with access to the Product API that contains that ApiProxy. It's a very simple configuration with a one to one relationship between App, APIProxy and ApiProduct.
After generating the access token with OauthV2 and invoking the created ApiProxy with that token, I always get the error:
Invalid API call as no apiproduct match found
keymanagement.service.InvalidAPICallAsNoApiProductMatchFound
The proxy that generates the OauthV2 for access is also deployed in the same environment. I've tried putting it in 2 environments and I always get the same result.
How can I debug this case? the proxy debug doesn't have much detail apart from the exception. What might be missing?
Regards,
Pedro Oliveira
Solved! Go to Solution.
The Product itself must be enabled on a particular environment. Have you checked that?
In Apigee hybrid, there is a newer model of configuration of the API Product. You need to add an API Proxy, and then specific operations on that API Proxy, where the operation implies a VERB + Path pair. Have you done that? If so, maybe you can use the Apigee API to inquire as to the product configuration and give us a look at it. Paste it here. The command I am suggesting that you run, will be like this:
curl -i -H "Authorization: Bearer $TOKEN" https://apigee.googleapis.com/v1/organizations/$ORG/apiproducts/$PRODUCTNAME
It will look like this:
"operationGroup": {
"operationConfigs": [
{
"apiSource": "apiproxy-1",
"operations": [
{
"resource": "/collection/*",
"methods": [
"GET"
]
}
],
"quota": {}
},
{
"apiSource": "proxy2",
"operations": [
{
"resource": "/path2",
"methods": [
"POST"
]
}
],
"quota": {}
}
],
"operationConfigType": "proxy"
},
And by looking at that we can triangulate that Product configuration against the request you're making.
The Product itself must be enabled on a particular environment. Have you checked that?
In Apigee hybrid, there is a newer model of configuration of the API Product. You need to add an API Proxy, and then specific operations on that API Proxy, where the operation implies a VERB + Path pair. Have you done that? If so, maybe you can use the Apigee API to inquire as to the product configuration and give us a look at it. Paste it here. The command I am suggesting that you run, will be like this:
curl -i -H "Authorization: Bearer $TOKEN" https://apigee.googleapis.com/v1/organizations/$ORG/apiproducts/$PRODUCTNAME
It will look like this:
"operationGroup": {
"operationConfigs": [
{
"apiSource": "apiproxy-1",
"operations": [
{
"resource": "/collection/*",
"methods": [
"GET"
]
}
],
"quota": {}
},
{
"apiSource": "proxy2",
"operations": [
{
"resource": "/path2",
"methods": [
"POST"
]
}
],
"quota": {}
}
],
"operationConfigType": "proxy"
},
And by looking at that we can triangulate that Product configuration against the request you're making.
Hello,
thank you. I did that Curl and i've got:
{
"name": "testOauthV2-DMZ",
"displayName": "testOauthV2-DMZ",
"approvalType": "auto",
"attributes": [
{
"name": "access",
"value": "public"
}
],
"environments": [
"dev-dmz-env"
],
"quota": "100",
"quotaInterval": "1",
"quotaTimeUnit": "minute",
"createdAt": "1661351562541",
"lastModifiedAt": "1661351562541",
"operationGroup": {
"operationConfigs": [
{
"apiSource": "testOauthV2",
"operations": [
{
"resource": "/testoauthv2"
}
],
"quota": {
"limit": "50",
"interval": "1",
"timeUnit": "minute"
}
}
],
"operationConfigType": "proxy"
}
}
When i've got the token:
{
"organization_name": "apigee-p-XXXX",
"application_name": "1507d219-6544-42b9-YYYY-XXXXXXX",
"api_product_list": "[testOauthV2-DMZ]",
"token_type": "BearerToken",
"access_token": "XXXX",
"issued_at": 1661422771200,
"expires_in": 3599,
"status": "approved"
}
This is a test case i tried because it is happening for all others that were imported from apigee edge.
Could it be some extra configuration?
Regards.
It was a problem related with the base Path and the access to operations.
Thank you @dchiesa1
I'm glad you got it resolved!