How to setup authenication on rest endpoint to pull/track from bubble?

Hi Everyone,

I’m new here and investing time to learn bubble(which so far is awesome!). I had a question, I’m building a site but some of my functionality (running/serving predictive models) cannot be done entirely in bubble. It’s not a problem because I figure I would do this on another cloud and then serve it to my users via rest api.

I’m using GCP + flask to serve the rest endpoint but I want to limit and track the number of times people can use the service. I thought about maintaining viewcounts in my bubble app directly but I think it would be better to manage this via the backend for more control.

How can I do this? Is there a best practice? I thought I would create a random token for each user on my site but I’m not sure how to pass it to my backend API and how to sync the two(so if a user creates a account they can automatically log in)?