Can I grab the User Token from within Bubble?

I have a Bubble web app and a totally separate Android app. Users on the Android app can log in with their web app credentials using a simple login API I created in Bubble. As you’d expect, the API call returns a User Token, which can be used to log the user in without their email and password (until the token expires).

So far so good…

What I’d like to do is grab that same user token from within my Bubble app and use it elsewhere e.g. pass it as a URL parameter.

What’s the best way to access that token? As far as I can see, the token is not currently stored anywhere that is accessible to me.

Should I force all logins to be via the API call I set up and store the token somewhere for later use? Or is there a way to access it directly?

All suggestions welcome.

So I’ve solved this for now by calling my own endpoint and storing the user token in the user data table.

I’d welcome any feedback on:

  1. Whether there’s a better way to do this?
  2. If storing the user token in the user data table is a good idea from a security viewpoint

All suggestions welcome.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.