1 year ago
#330138
MoonBoots
Unsubscribe link in email redirect to Vue.js landingpage
I'm working on the frontend for a Vuejs app with a PHP/Laravel backend. I have no PHP/Laravel or backend know-how.
I have to create a landingpage for clients to unsubscribe for after clicking the unsubscribe link.
- We have multiple newsletters.
- Unsubscribe link redirects to a Vuejs landingpage.
- User can then unsubscribe for some or all newsletter updates.
The problem now is:
I can't show them all the newsletters they're subscribed for without first having to login. We don't want them to log in.
- What data do I need from the backend to show the client all the newsletters they're subscribed for?
- How is this data implemented in the newsletter and or unsubscribe link?
- And how can I catch that data on the Vuejs frontend when they're redirected to the landingpage?
When they're are logged in, I make an api call to get a contactDetails object which has all the newsletters they're subsribed for. I then simply toggle that data when they unsubscribe and make a post request to update the contactDetails.
When they're not logged in, it obvioustly throws a 401 unauthorized error when fetching the contactDetails.
What's the best way to get this to work?
Frontend: Vuejs Backend: Laravel
php
vue.js
unsubscribe
0 Answers
Your Answer