Hi there, one of our customers just used up around 70% of our M2M tokens within one hour (they had a script that looped and requested tokens endlessly). How can we restrict this to not happen again in the future (so as not to affect our other customers or force us to upgrade to higher limit just because of one customer’s mistake)?
I saw this post talking about shipping such a feature but I could not find anything
You can use an M2M Action to enforce your own internal limits for M2M token authentication.
Additionally, you can cache the Management API tokens in the Action since these tokens do not expire immediately. This will help avoid going over the quota for your M2M token authentication.
It seems like I’d need to connect to some kind of external database (to keep track of how many M2M tokens have been used per customer) to enforce the internal limits within an action (sounds rather complicated ).
Would the same be true for caching or is there some in-built cache I could use to cache the token within the Action? (edit: just saw you linked a post about the caching let me read that first )
OK answering my own question: seems like the caching is in-built => yay! Could you outline in a little more detail how I could use this cache feature to avoid that a call to the OAuth endpoint (the one below in our case) counts against our M2M token limit (by returning a cached token through an Action??).