X OAuth 2.0 app setup
X OAuth 2.0 app setup begins with the provider application. Configure an X OAuth 2.0 app as a Web App with Read and write permissions, then register its callback and provide the client credentials.
Callback URL
Register {{API_BASE_URL}}/v1/connect/twitter/callback in the provider’s Callback URI / Redirect URL. Configure the API origin for your environment and keep the callback path unchanged.
Configure X
- Use the X Developer Portal to add a project and its app. Choose Set up in User authentication settings.
- Enable OAuth 2.0, select Web App, and set app permissions to Read and write.
- Enter the callback under Callback URI / Redirect URL, add your website URL, and save.
- Copy the OAuth 2.0 client ID and client secret.
Permissions and access restrictions
Use the permission identifiers listed in the table. offline.access enables connection refresh without asking the account owner to authorize again. Keep it with the other listed permissions when this refresh behavior is required.
Save the app before connecting an account
Open Integrations → Apps (BYOK) → New app and select X (Twitter). Fill the client ID and client secret fields using the credential map, then save the app record. Begin a new integration, pick that saved app, and only then choose X (Twitter) for account authorization. Selecting the app first binds the connection to the intended credentials.
| Permission |
|---|
| tweet.read |
| tweet.write |
| users.read |
| media.write |
| offline.access |
Use the exact scope identifiers required by this connection.
| Provider value | BYOK field |
|---|---|
| OAuth 2.0 client ID | client ID |
| client secret | client secret |
Store the secret in the app record; do not include it in a shared callback URL.
{{API_BASE_URL}}/v1/connect/twitter/callback