users in my app sends data to database over API workflows. Every user has own API token (bearer) for authentication. To this time, i created API tokens manually a re-write it to DB, where was tagged as “available”. And when some user made registration, token was assigned to him.
Problem is, that i cant create tokens manually like that when app will expand.
Please, is possible to automatically create API Token (Bearer), which will be used by users api authentication?
You could do one of two things off the top of my head:
Simpler method:
Why aren’t you creating 50 api tokens at once (or 100, or 1000) and then saving as a csv and then uploading that csv to bubble. Then in that bubble database, you have a field which links to a user which associated a token to a user. When a new user signs up, you look for the next unlinked token and link them with that one.
More complicated method
Everytime a user signs up, you create a webhook which connects with your api to send a hashed copy of the user’s unique ID. Your api then creates this as the next token and on the bubble side, it saves the hashed version to the user record. (I’ve never set this up myself and could be using the terminology slightly incorrectly but there are plenty of tutorials online of how to connect outside applications to you bubble database (i.e. them pulling info from bubble, instead of the other way around))
Obviously you’ll have to make sure you have the correct privacy rules in place.