Verify ghost membership status and tier via API for 3rd party app?

My site has a lot of video content. Let’s say I want to take things up a notch and provide my members an app for Roku or Apple TV or something that allows them to play the daily video.

Setting aside, for a moment, the challenges of getting a CDN working correctly, HOW could I go about verifying that a member is a member and is paid at a high enough tier to access the video?

How could a person “log in” on a 3rd party app? Since there’s no password setup with Ghost, is there some kind of login token that could be passed to an app?

You’re diving deep into Ghost territory here :smiley:

Ghost authentication works via a “magic link”. You can quite easily trigger that from a 3rd party app using this API endpoint:

/members/api/send-magic-link/

(You can observe the payload by triggering that request from the portal while opening the network tab in your browser’s developer tools)

Now, the user will receive a link, which, when opened, requests a session and sets a cookie in the browser.

The big question is how you would port that onto a 3rd party app.

As far as I see, you will not be able to do that with the standard tools Ghost comes with. You’ll have to dig into the Ghost core and do some modifications on the server itself, potentially creating an additional API endpoint specifically for this 3rd party authentication.

Given all of this, I would like to point out this reply from the other post you opened:

Ghost as a platform might not be ideal for your plans of integrating your content into smart TVs – I am sure it can be done, but any modification of the Ghost core always mean ongoing need of maintenance, when new Ghost versions come out.

Quick addition: have a look at this blog post I just found, which goes into a bit more detail on the authentication process: How members authentication work in a Ghost blog? A deep dive into Ghosts open source

1 Like

Thanks for the reply. Truthfully, there are some things I want to do that make ghost a less than ideal platform, but I’ve got 900 members signed up on ghost so I don’t have the option to migrate without disrupting a lot of people. And, actually, I really do like the platform a lot. Just gotta figure out how to do what I want to do within the limitations of the code.

I could probably host video on Vimeo, use Zappier to update a secure database with current customers, and let an app check that database. So essentially, I would do it all off of the ghost platform, but I would use Zappier or to keep my authentication database up-to-date.

1 Like

Personally, I am always a fan of crafting an online presence around a business problem, rather than trying to fit a business into rigid solutions (like, in this case, Ghost).

Even though this is a Ghost forum, I would encourage you to look around a little bit and see what would work best for you. You’re right, the platform is great – and it also seems to fit your use case of publishing videos to different membership tiers.

But depending on your budget and amount of time/effort you want to invest into your project, a slightly more custom solution or just a different platform to build upon might come in handy.

So, keeping that in mind, I am curious what makes you think that you don’t have the option to migrate? From my perspective, Ghost offers the perfect prerequisite to do just that, given that you can easily export all your members to then import them elsewhere. Content export is also quite simple. So, curious where you see the disruption :slight_smile:

1 Like

I would think the main obstacle would be moving my 900 members without making people ‘re-subscribe’ or losing any of their subscriber data.

Given that the subscriber data (duration, credit card info, etc.) is actually stored in Stripe, it should be doable. Especially given how widely used Stripe is by now.

Just stumbled upon this post – this could also be interesting for you @JD_Roberto:

thank you! I’ll check it out