Machine to machine token quota

We are planning to create a cloud function that is triggered on pdfs upload on a bucket, extracts some images out of the file and saves them back
After saving it has to contact the main app through rest APIs to notify that the image extraction has been completed (with the images paths)
We are planning to use M2M tokens for the communication between the cloud function and the main app, but being on a dev plan we only have 1000 calls per month

  • What happens if we exceed the quota? are we charged on a pro rata quote or the generation of new tokens is blocked?
  • Every time the function is invoked and generates a new token that counts as 1 token towards the count, right? I suppose the alternative would be to persist the token somehow between different runs to lower the usage

Hi @plweb,

There will first be a warning to let you know the quota has been exceeded. The first time the quota is exceeded, you should have a little while before token generation is blocked. After that, new tokens won’t be created. I believe the initial warning gives you a week or so before blocking token generation.

That is correct, each time a new token is generated, that counts as 1 token towards the count. It would be best to cache the token and keep using it until it expires.