Set up own API for end users

To run this issue_token workflow you’ll use an admin token that you’ve created in Bubble. From an earlier message it looks as though you’ve already found these (Settings > API > API Tokens) and you’ll attach it as a Header to the call you’re making in the API Connector. You’ll also add two Parameters (not Headers) for email address and password. So it should look like this:

For testing purposes, use your own test account email and password.

No need to make a second call. When you Initialize the call shown above you will receive the following back:

Hit Save and then you’ll be able to access that response within your app via any subsequent step in the workflow that calls that API.

As part of your ‘Request Access Token’ UI that you give users, you’ll just ask them to confirm their password via an input field… you can get their email from your Current User object. So, on the frontend, the call will be setup like this:


One thing that I haven’t mentioned - and you can come back to this once the basics of it are all working - is that you’ll need to create a token refresh process. The positive of the token that we’re creating here is that it will outlive password changes etc., but the downer is that it will expire one year from when it is issued and no longer work. It’s not a biggie but you’ll need to think about the best way to manage that in your context.

This can simply an email to them, scheduled for 9 months from the moment the token is issued with a link to an ‘update token’ UI, which will be a repeat of the process as above.

7 Likes