Configure Twitter login and rich embeds for Discourse

:warning: In order for rich embeds to work properly a Basic plan for X Dev is mandatory. Rich embeds will not work with the Free X Dev plan.

Twitter configuration

Go to https://developer.twitter.com/en/portal/projects-and-apps

Create the Twitter application

Click + Add Project

Complete the 4 steps.

  1. Complete the three next steps:

    1. Write down the API Key[1] and the API Key Secret[2]. You’ll need them later.

Configure the app settings

Click App Settings on the bottom right.

Click Set Up in User authentication settings:

Fill in the form. Change the URLs in App Info accordingly to your forum’s URLs.

Click Save.

Discourse’s configuration

In your admin panel, go to Login and find the Twitter-related settings:

  • Check enable twitter logins

  • Put your API Key in the twitter consumer key field

  • Put your API Key Secret twitter consumer secret field

You should now be able to log in with your Twitter Account.

Rich Embeds

The above steps also apply if you want to enable “rich embedding” which allows displaying tweets with their media (images video, etc). If you want rich embeds but don’t need Twitter login, simply uncheck enable twitter logins and leave the consumer key and secret intact.


Rebaking Posts / Rebuild HTML

:warning: It’s important to know that rebaking or using the rebuild HTML button on posts that contain tweets will re-pull the tweet(s) and count them towards your monthly tweet cap usage.


  1. Also know as twitter consumer key ↩︎

  2. Also known as twitter consumer secret ↩︎

72 Likes