Bubble + Xano - Auth/me API Call

I tried 3 ways to do an API call to Xano to retrieve current user’s details (auth/me).
1 way use as Data with dynamic token and it works.
2 ways “use as Action”. 1 the token is hardcoded and it works. The 2nd, the token is dynamic and it doesn’t work.

When I debug the “use as Action” workflows, the debugger (and F12) shows the same “Bearer ” passed. The hardcoded is black and the dynamic is blue. I copy pasted both strings and compared them and they are identical.

Why is the hardcoded token working and not the dynamic one? Where is the issue coming from?

API Setup

Workflows:

Debugging:

Results:

Evaluator for dynamic token:

It’s really hard to help with your screenshot. I suggest that you try sending both request to requestbin (or similar service) and inspect both request. You may find what is sent with hardcoded VS dynamic values. This will probably help you to find the issue.

Thanks for the tip.
It looks like the token is not being sent EVEN THOUGH the same parameter displays properly on the UI and before calling the API

Can you explain how ypu get the bearer token and why you store it in local storage? I guess you are using a plugin? What ifnyou inspect the localstorage directly?

My guess is the Xano API Auth workflow is firing before the local storage is read, thus the dynamic token is not there.

1 Like

I get the bearer token from the xano response.
I store it in local storage as a cookie for persistence.

That’s what I think is happening OR Bubble detects a token and cleans it out. I have this theory because Bubble does not allow dynamic header in private mode.

Bubble doesn’t detect it’s token and doesn’t clear it. What the get localstorage action do? Did you tried to run step by step