Example
For example, if your app is a photo edition app and you want to limit the number of generated images per month, you can create a quota calledgenerated-images
and attach it to your product.
Then, you can set the limit of the quota to:
- 10 generated images per month for members on the free plan
- 100 generated images per month for members on the premium plan
Create a quota
To create a quota, visit the Quotas page. Create a quota and name it idiomatically. For example, if you want to limit the number of generated images per month, you can name itgenerated-images
.
Then, you can set the limit of the quota for every product you want to apply it to.
Go to the Products page and click on the product you want to apply the quota to.
Then, click on the Quotas tab and select the quota you just created.
Now, every user who subscribes to this product will have this quota applied to them.
Manipulate quotas
There are two ways to manipulate quotas:- Programmatically using our Admin SDK or Frontend libraries depending on your use case.
- Manually using the Admin Console
- Increase or decrease the limit of a quota for a specific user.
- Reset the limit of a quota for a specific user.
- Get the current usage of a quota for a specific user.
- Verify if a user has reached the limit of a quota.