Magic Links from backend workflows don't work if triggered outside bubble

Hey guys,

I spent hours figuring this out. Posting it here so someone else can find it.

If you create an API workflow that generates a magic link, the link will only work if the API workflow was triggered inside a Bubble session (i.e.: an browser page).

If you trigger the API workflow with webhook, the link will still send and be clickable, but the user will not be logged in.

You can replicate this by logging out your test user sessions, then triggering the API workflow from Postman or a webhook.

None of this is noted in the manual and the behaviour is tricky to troubleshoot.

webhook API worklfow magic link not working broken

1 Like

Can confirm this is still a problem.

Unfortunately I spent a couple hours troubleshooting before finding this post…

I remember being in touch with support about this.

The problem, if I recall correctly, is that domain of the magic link wasn’t matching the url for the app.

I think the problem was solved when the webhook called the correct endpoint (the custom domain).

1 Like

Thanks for the additional information, I was never able to determine the root cause.

The work-around I am using is with 2 backend workflows:

Workflow 1: When Webhook is called, assign temporary password to user then modify a specified user field to “true”

Workflow 2: When “A User is Modified” (conditional to that field), Send Magic Login Link, then reset the user field back to “False”.