Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

Twitter v1 (Deprecated)

X/Twitter(opens in a new tab) considers this method deprecated. We strongly recommend using the latest version (v2) for future-proofing your application.

How to set up social connection with Twitter v1

Overview

Adding social connection with Twitter to your app with Clerk is done in a few steps - you only need to set the Client ID, Client Secret and Authorized redirect URI in your instance settings.

Clerk does not currently support preconfigured shared OAuth credentials for Twitter on development instances. You will have to provide custom credentials for both development and production instances, which includes generating your own Client ID and Client Secret using your Twitter Developer account. Don't worry, this guide will walk you through that process in just a few simple steps.

The purpose of this guide is to help you create a Twitter account and a Twitter OAuth app - if you're looking for step-by-step instructions using Clerk to add social connection (OAuth) to your application, follow the Social connection (OAuth) guide.

Before you start

Configuring Twitter social connection

If you don't have an existing Twitter Application you've set up for social connection, you need to register a new one at the Twitter Developer Portal(opens in a new tab). Note that the process requires approval from Twitter before your new application can be used.

To do so, go to "Projects & Apps(opens in a new tab)" and click "+ Add App" to create a new application. After entering a name, you'll be presented with your app's credentials: API Key and API Secret. Copy those values as you will be needing those shortly.

You will need your application to be approved for elevated status to be able to use it with Clerk. You can apply for the status in Twitter developer dashboard(opens in a new tab)

In the Clerk Dashboard, go to User & Authentication > Social Connections(opens in a new tab) and enable Twitter. In the modal that opened, ensure Use custom credentials is enabled and paste the API Key and API Secret values which you copied in the previous step. Then, copy the Authorized redirect URI.

Navigate to your application settings screen and scroll down to the User authentication settings section and click Set up.

Setting up User Authentication settings of a Twitter app

In the next screen you'll be presented with the user authentication settings. Make sure that both OAuth 1.0a and Request email address from users are enabled.

Also, enter the Authorized Redirect URI that you grabbed in the previous step from your Clerk instance's settings and insert it in the Callback URI setting. Your app's settings should like similar to the ones below. Fill any other required fields and click save. Your Twitter App is now ready.

Fill in the Callback URI

Don't forget to click Apply in the Clerk dashboard. Congratulations! Social connection with Twitter is now configured for your instance.

Last updated on February 5, 2024

What did you think of this content?

Clerk © 2024