Discord linked roles

I am setting up a Ghost website with a paid membership, and I want to grant paid members an exclusive role on my Discord server. Discord has a new featured called Linked Roles that allows members to authenticate with third-party credentials to gain special roles on Discord. For example: connect a Twitter account with at least 1,000 followers > get a special role on Discord.

This is the flow members go through to gain a linked role:

  • Login to Discord
  • Go to the specified server and open the Linked Roles menu
  • Choose the role you want
  • Authenticate with your third-party credentials
  • Discord verifies you meet the criteria and grants the role

I am looking into building a Ghost integration that is hosted on Cloudflare Workers, but I am a novice when it comes to OAuth2 and authentication in general. Does anyone have advice on how I should approach this? Is it even feasible currently?

1 Like

This would be a great feature to have natively. I’m hoping to offer a similar thing to members.

Yes, please build it.

I decided to abandon the Linked Roles approach and instead built my own integration inside a Discord bot. When a new member subscribes on the website, the welcome page gives them instructions for joining the Discord server and claiming their role with a simple command.

So far this has worked well. If there is enough demand for this feature, I will look into making the integration widely available.

1 Like

Any links that can help me research how to do this myself? It is my stopgap on my company moving forward right now.

You’re missing the Oauth flow.

But you can do this with ghost “out of the box” – except you need a separate cloud function, lambda, etc.

This uses the linked roles feature: