Auth token for later usage when a user is not logged in.

Options

Hello fellow Xano users!

I've been loving Xano's extensive knowledge base and helpful video tutorials, but sometimes I struggle to find precisely what I need for my projects. I'm hoping someone can guide me in the right direction or recommend a tutorial that aligns with my current goal.

Here's what I'm working on: I'm using Bubble as my front end along with a scheduler, and I want Bubble to send emails to a list of email addresses at a specified future date. The twist is that my user table is authenticated. So, how can I access these users using an authentication token when they're not logged in?

I understand that I might need to store some kind of authentication token in my Bubble database, which is suitable for my case. However, I'm eager to learn how to set up this authentication process in Xano.

Thanks a bunch!
Warm regards,

Best Answers

  • devben
    devben Member
    Answer ✓
    Options

    To access all users in your Xano database, you'll first need the email and password of an existing user in your database. Here's a step-by-step guide on how to do it:

    1. Retrieve User Authentication Token:
      1. From your Bubble application, initiate a POST API call to your Xano endpoint.
      2. The endpoint should be "/auth/login?email={emailofthexanouser}&password={pwofthexanouser}".
      3. The response you receive will be in JSON format and contain a key called "authToken".
    2. Use Authentication Token:
      1. Once you have obtained the "authToken," you can use it to make a GET request to the "/user" endpoint in Xano.
      2. This GET request will provide you with an array of Xano user objects, which includes details such as email and more.

    I hope this explanation helps! If you need more detailed information, feel free to ask.

  • tig1893
    tig1893 Member
    Answer ✓
    Options

    Thanks very much ! devben! your a legend!!🤩