How to Get Twitter Auth Keys
Step-by-Step Guide
- Go to the Twitter Developer Dashboard. If you don’t have a developer account, sign up first.
- Once you’re in the developer dashboard, select Projects & Apps from the sidebar.
- You’ll see a nested structure where the first level is the Project, and the inner level contains the Application.
- Click on your application, which will take you to the app details page. Scroll down until you see User authentication settings.
- Click Setup, which will guide you through the "User authentication settings".
- Under Type of App, select Web App, Automated App, or Bot.
- In the App Info section, set the Callback URI / Redirect URL to
http://localhost:3000/api/auth/callback/twitter
. - After adding your domain, you’ll receive your Client ID and Client Secret.
Add these credentials to your .env
file:
TWITTER_CLIENT_ID=your-twitter-client-id
TWITTER_CLIENT_SECRET=your-twitter-client-secret