To set up Twitter as a channel, you must associate the bot with a Twitter account, define a Twitter app, and enable the integration. To add Twitter as a channel, follow the below steps:
- Create Twitter App – Log in to Twitter. In Twitter App Management Console, create an app to provide authorization for communication between Twitter and your Kore.ai bot.
- Setup Keys and Tokens – Generate the authentication keys and tokens for the Twitter app to communicate with the Kore.ai Bots Platform, and then copy those keys and tokens to Kore.ai Bot Builder.
- Update Permissions -To use Twitter as a channel for your Kore.ai bot, you must define the Twitter app permissions used to interact with the Kore.ai Bots Platform.
- Enable Channel – After setting up the Twitter app and entering configuration data in Bot Builder, you must enable the channel.
Add Twitter Channel
To complete this procedure, you must create a Twitter account if you do not have one already.
Note: The steps are modified in v7.1 of the platform in sync with changes to the channel requirements.
Create App
- To create a Twitter app, you need a Callback URL. To find the Callback URL, follow the below steps:
- In the Bots section of the Bot Builder, click the bot you want to add the Twitter channel to.
- On the Channels tab, click the Twitter icon. The Twitter Channel page is displayed.
- Use the Callback URL from the Configurations tab of Twitter channel page.
- Log in to Twitter apps portal and select Create New App.
- Provide all the required information, and click Create your Twitter application to create your new app.
Keys & Tokens
After the application is created:
- Go to the Keys and tokens tab.
- Under the Access token & access token secret section, click Create. This action generates the Access Token and Access Token Secret.
- Copy the values of API Key, API Secret Key, Access Token, and Access Token Secret fields. You must provide them while configuring the Twitter channel from the Bot Builder for the respective bot.
Permissions
- Go to Permissions tab; click the Edit and set the Access Permission to Read, Write, and Direct Messages.
- Click Save.
- Go to the Dev environments page and set up the environment for your app.
- Click Set up dev environment under the Account Activity API section. Provide a value for Dev environment label, say ProductionEnvironment, and choose your app.
- Click Complete setup.
Enable Channel
- In the Bots section of the Bot Builder, click the bot you want to add the Twitter channel to.
- On the Channels tab, click the Twitter icon. The Twitter Channel page is displayed.
- Go to Configurations tab.
- Enter the API key, API Secret Key, Access Token, and Access Token Secret obtained from the Keys and Tokens tab of your Twitter app.
- Enter the Environment Label as set up in the Permissions section of the Twitter app.
- Click Authorize to register a webhook with your Twitter app and to subscribe to realtime activities.
- Enable Channel and Save.
- Your Twitter channel is set up and ready for Publishing your Bot.
Edit Twitter Channel
To edit the Twitter channel, follow the below steps:
- Hover over the channel and click to modify.
- You can make necessary updates to your channel configurations and save them.
- You can also disable or delete the channel information by clicking the Settings icon.
Select one of the following commands to modify the channel:
- Disable/Enable – Click Disable to temporarily disable the use of the Twitter channel for your bot. To enable use of the Twitter, click Enable.
- Delete – Click Delete. On the Delete Confirmation dialog box, click OK to permanently delete the bot channel configuration.
Warning: This operation is permanent, and cannot be undone.