Twitter channel with Chatwoot requires access to Twitter APIs. We are using Account Activity API. If you don't have an access to Twitter Business APIs, apply for one at Twitter developer portal.
Once your application is approved, you will be able to add Twitter Apps and dev environments. If you have applied for a team account, you will able to invite more team members. Inorder for the channel to work you will have to set the following environment variables. We will describe what it means in the following sections.
Go to Projects & Apps Overview Console in Twitter Developer Portal. Go to "Standalone Apps" section. Click on "Create App" button.
Provide an app name and click on "Next".
You will be able to see the
API Key and
API Secret Key in the next step. Save this information as it would not available again.
API Secret Keyas
Hooray! The app is created now. Next step is to enable "Sign in with Twitter" permission.
Complete the application profile. See the "App Details" section as shown below. Update the name, logo and description. Use the "APP ID" displayed in the screenshot as
TWITTER_APP_ID in Chatwot.
Head over to the "App Permissions" section. Update the permission to "Read and Write and Direct Messages".
Chatwoot uses "Sign-in with Twitter" which requires 3-legged OAuth to be turned on. Head over to Authentication settings in your app settings and click on "Edit".
Enable 3-legged OAuth. Add the callback url as
Complete the rest of the details in the authentication settings and click on "Save".
In order for the DMs and Tweets to work in realtime, you need to set up Account Activity API dev environment as follows. A Twitter development environment is required for all installations of Chatwoot.
Head over to Products -> Premium -> Dev Environments. Click on
Set up dev environment. You will be able to see a form as follows.
Dev Environment Label, this should be an alphanumeric string. Use the same string as
TWITTER_ENVIRONMENT in Chatwoot.
Once you do this, you will ready to use Twitter Channels. To connect your Twitter Account, follow this guide.