See usage amount of API tokens

Hi,

I’ve created an API token for a Public API endpoint of my bubble application.
I want to see how many times the API token (private key) is used/called by external partners to collect data of my application.

Is this possible?

1 Like

No.

You could do it by creating an API Token data type that you provide to external partners, and track usage in BE workflows with a Log data type. Just make the BE workflow accessible without authentication, then terminate if Do a search for API token (token = the received API token) :first item is empty

I recently asked about this and the team said there is no ability to see the # of Data API calls all up or using a specific API key. If you put in the feature request I will upvote it!

Noting for the request, this is important to see Data API usage for different plan types:

The Data API and Workflow API handle a set number of requests per minute depending on your plan:

Starter: 15 000

Growth: 25 000

Team: 35 000

https://manual.bubble.io/help-guides/maintaining-an-application/performance-and-scaling/hard-limits

Thanks for the explanation.
Can you be a little bit more specific?

I created a datatable for the logging of the API usage, but didn’t figger it out how to set up the BE workflow.

Thanks!

You need an API Token data type, protected by appropriate privacy rules.

Each user has an API Token, which contains the token (text) they should pass to your API.

Inside the BE workflow, Do a search for API Tokens (using the token you received as a parameter in the BE WF). If it’s empty, you know the token is invalid and can terminate the workflow. If it’s not empty, continue the workflow, and Create a new a Log that tells you what token was used, what request it was etc. Log is a new data type.

1 Like