# How can I achieve a 302 redirect from an email link

**URL:** <https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491>\
**Category:** App Organization\
**Created:** [April 12, 2024, 10:24pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491 "2024-04-12T22:24:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt28](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/matt28/32/204769_2.png) [@matt28](https://forum.bubble.io/u/matt28)\
**Post date:** [April 12, 2024, 10:24pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/1 "2024-04-12T22:24:43Z")

</div>

Hello,

I’m looking for a way to achieve a 302 redirect after a user who is logged out clicks a link to my app from an email. I want them to be taken directly to the URL path from the email after they log in.

The problem is that I’m having to use “this URL” (screenshot below) in order to store the URL path from the email link so that the user is taken to the correct path from the email after logging in, which is causing a 200 redirect. Is there another way to redirect a user to a specific URL path after they log in while keeping a 302 redirect for logged out users?

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/f/bf6afe647c167cd16468767a398158e78d31acd9.png)

---

<div class="post-metadata">

**Author:** ![code-escapee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/code-escapee/32/195485_2.png) [@code-escapee](https://forum.bubble.io/u/code-escapee)\
**Post date:** [April 12, 2024, 10:35pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/2 "2024-04-12T22:35:26Z")

</div>

I’m not understanding what you mean in this context by a 302 v 200 redirect.

IF you want to have users log in and then return to the page they initially landed on, then send the page as the redirect (not the URL) and upon login, have a conditional for navigation s/t like this:  
IF url param “redirect” is empty → follow default navigation rules  
ELSE go to page of the redirect parameter.

---

<div class="post-metadata">

**Author:** ![matt28](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/matt28/32/204769_2.png) [@matt28](https://forum.bubble.io/u/matt28)\
**Post date:** [April 12, 2024, 11:06pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/3 "2024-04-12T23:06:02Z")

</div>

I’m looking for a redirect before any data is loaded instead of loading the page first (when they click directly from the email link and aren’t logged in).

Can you explain what you mean by sending the page as the redirect? I tried using the checkbox “Send current page parameters” instead but when I do that it doesn’t take me back to the page I initially landed on after logging in. I have the redirect set up on the login page.

---

<div class="post-metadata">

**Author:** ![code-escapee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/code-escapee/32/195485_2.png) [@code-escapee](https://forum.bubble.io/u/code-escapee)\
**Post date:** [April 12, 2024, 11:17pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/4 "2024-04-12T23:17:38Z")

</div>

> [@matt28](#):
>
> I’m looking for a redirect before any data is loaded instead of loading the page first

IF the content of the page is only visible IF current user is logged in and the condition I mentioned above is in place then it will essentially load before the page is loaded (prob Xms delay but minimal)

---

<div class="post-metadata">

**Author:** ![matt28](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/matt28/32/204769_2.png) [@matt28](https://forum.bubble.io/u/matt28)\
**Post date:** [April 12, 2024, 11:27pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/5 "2024-04-12T23:27:13Z")

</div>

Oh, I see what you’re saying. The issue is I have a SPA and I need to send multiple parameters of the page (ie. [mysite.com/dashboard/profile/billing](http://mysite.com/dashboard/profile/billing)). Is this possible?

---

<div class="post-metadata">

**Author:** ![code-escapee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/code-escapee/32/195485_2.png) [@code-escapee](https://forum.bubble.io/u/code-escapee)\
**Post date:** [April 12, 2024, 11:29pm UTC](https://forum.bubble.io/t/how-can-i-achieve-a-302-redirect-from-an-email-link/317491/6 "2024-04-12T23:29:01Z")

</div>

IF you have a SPA then login is on that very same page! 😉 or at the very least once logged in user is on same page so the only thing to send is parameters

But sure just send additional parameters and reference those in residrec.
