Twitter Direct Messages

In order to deploy your bot to Twitter Messenger, you will need to follow a few steps described below.

Activate Direct Messages

In Twitter, Direct Messages can be opened to everybody or only to trusted people.
In order to add a chatbot to your Twitter account, please check that the following Message button is active for all Twitter users.
Here is a useful link explaining Twitter DM => https://help.twitter.com/fr/using-twitter/direct-messages
Or go to your account settings and follow the steps below

4286 4171

Once you have activated direct messages in your twitter account, you should see the DM button, this means that anyone in Twitter is now able to have private conversations with you

1338

Please check that the option below is activated before proceeding to the next steps.

1058

Sign-in to your Twitter developer account

Here is the url to the Twitter developer portal: Link

2000

🚧

Use the right Twitter account

Obviously, all the steps below can only work if the twitter account used to create the app is the one you want to connect to Twitter (eg you should use @Enterprise_Inc in the developer process and not your personnal Twitter account.
In this case we should create the app with the @WWF_Climat account

📘

Account Validation

You will probably have to go through an application process to get add the developer account privileges to your Twitter account. After completion, your application can take a day or two to be officially validated by the Twitter team.

Below it the prompt you will see if your Twitter account is not a developer account yet.

2000

Answer the questions.

2000

Accept the Developer Agreement & Policy

2000

You will soon be notified by the Twitter team of your application status, it takes usually 1 or 2 working days.

2000

Connect your bot to your Twitter app

Once you are connected to the developer portal,
click on the Apps menu and click on the Details button.

2000

Click on the Keys and tokens tab to get the useful information to make the connection between your twitter app and your Smartly.ai chatbot.

2000

Make sure that the access permissions are set to Read, write and Direct Messages.

2000

Then go to Smartly.ai and click on the Twitter integration.

2000

Here is the Twitter integration form to complete the connection.

2000

Then copy and paste the information from your Twitter app to the Twitter integration of Smartly.ai as shown below

2000

For the last field, go to the Dev environment page

2000 2000

Give a name to your dev env and select the desired app

1914

Then you will find the Dev environement label in the Account Activity API / Sandbox section

Once all the fields are in the integration window, click on the Launch button.
From there your bot is ready to answer your users!

To access your bot via Direct Message, head to the Twitter page and click on the DM button shown below.

1338

then you will have the welcome message and the start button previously set.

2000

Then the converesation starts and the bot can answer your users

2000

What’s Next