The OAuth1 and OAuth2 APIs give access to different data. Both are supported by Nango. This guide covers OAuth 2.0.
Creating a Twitter OAuth 2.0 App
1
Sign up for a Twitter Developer Account
If you don’t already have one, sign up for a Twitter Developer account. You’ll need to verify your email and phone number.
2
Create a new Project and App
In the Twitter Developer Portal:
- Navigate to the Projects & Apps section
- Create a new Project (if you don’t have one)
- Create a new App within your Project
3
Configure User Authentication Settings
Within your App settings:
- Go to the User authentication settings section
- Click Set up to configure OAuth 2.0
- Select OAuth 2.0 as the authentication type
- Choose the appropriate Type of App (typically Web App, Automated App or Bot, or Native App)
- Add your callback URL from Nango (find this in your Nango integration settings)
4
Get your OAuth 2.0 credentials
After setting up user authentication:
- Your Client ID will be displayed in the User authentication settings
- Generate a Client Secret if you haven’t already
- Save both the Client ID and Client Secret securely
5
Configure OAuth scopes
Select the scopes your application needs. Common scopes include:
tweet.read- Read tweetsusers.read- Read user profile informationoffline.access- Get refresh tokens for long-lived access
6
Add credentials to Nango
In your Nango integration settings:
- Find your Twitter v2 integration
- Add your Client ID and Client Secret
- Configure any required OAuth scopes
- Save your settings
Twitter also offers a client credentials flow that authorizes as an app instead of a user. This is listed under
twitter-oauth2-cc in Nango. For more details, check Twitter’s client credentials flow documentation.Access Requirements
Twitter’s access levels and requirements vary by use case:| Requirement | Status | Comment |
|---|---|---|
| Paid dev account | ❓ | Varies by API access level |
| Paid test account | ❓ | |
| Partnership | ❓ | May be required for elevated access |
| App review | ❓ | Required for certain access levels |
| Security audit | ❓ |