Embed Newsletter Signup on Private Site

Hi,

I want to add a newsletter subscribe input to my external site. I do not use Ghost’s hosted blog at all and display posts on my site through the api.

I have tried using the signup embed but the flow takes a user to the Ghost hosted blog which is marked as private in the admin panel yet users can see posts.

I have tried this flow here Create Ghost Blog Subscription from External Site using the admin api key but there is no confirmation flow, a user inputs their email and they are subscribed which isn’t good.

How can I integrate a flow where a user inputs their address on my external site → they confirm their email → they can now receive newsletters?

I’m using >v6 at the moment but can be flexible.

Thanks.

That link is 4 years old. send-magic-link now requires an integrity token. You can find example code for that flow here:

But I’m confused. You said that link is causing users to get subscribed without confirmation, but that’s just not what that endpoint does.

“I have tried using the signup embed but the flow takes a user to the Ghost hosted blog which is marked as private in the admin panel yet users can see posts.” This also doesn’t make sense to me, unless you have an admin cookie and are testing it. Try in incognito mode?

You should be able to do this either by using the signup form component (it’s in /ghost > settings) or by embedding portal (with data attributes that point back to the ghost install). But either way, after the user clicks the magic link, they’re going to end up at your Ghost site, so you’ll need to bounce them back to where you want them afterwards.

Thanks will take a look. To confirm if I embed the signup form and my site is private, a user still sees my Ghost site or they should see that a password is required?