Enforcing quotas with oauth2

I am trying to enforce an app quota using custom attributes for a proxy that is secured using an oAuth2 policy, but am unable to resolve any of my custom attributes. The attributes interval, timeUnit and count are defined properly for the app, and all contain valid values. I appear to have a problem with how I defined the references in the Quota policy, but I’m not sure what the issue is. Any ideas?

Error Message:

Failed to resolve quota interval reference oauthv2.verify-oauth-v2-access-token.app.interval in quota policy {1}

Note: The same error appears for the other two attributes as well (not shown).

OAuthV2 Policy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> Verify OAuth v2.0 Access Token VerifyAccessToken

Quota Policy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Hi @David Johns, when we use OAuth verify access token policy, the custom attributes from products are referenced in a different way.

It should be something like, apiproduct.*

apiproduct.quota.interval
apiproduct.quota.limit 
apiproduct.quota.timeunit

When in doubt check the Trace session,

Thank you @Siddharth Barahalikar !

Running a trace session made it simple to see all the active variables and their corresponding values. Working great now.