Getting started with Twitter

Prerequisites

  • In your Twitter account, make sure you have enabled Receive messages from anyone, found under Settings >>Privacy and safety >>Receive messages from anyone. If you don't enable this, end-users won't be able to message you and start a conversation.

  • You’ll need to set up an Account Activity API Subscription with Twitter. Twitter offers several tiers of access: only the standard tier is currently supported.

  • Create a Twitter app if you don’t already have one. Twitter apps can be managed via the Twitter app dashboard. Take note of your Twitter app consumer key and secret.

  • With the standard tier, you will need to create a dev environment associated with your Twitter app. You can do this via the dev environments dashboard. Take note of your dev environment label. You will need to specify this in the Environment Name field when configuring the integration with Unifonic Account

There are two ways you can start a conversation with a Twitter end-user yourself;

  • If the end-user follows your Twitter account.

  • If the end-user has enabled "Receive messages from anyone"

In other cases, the only way to start a Twitter conversation with end-users is when the end-user starts the conversation by sending you an initial message.

When a message is received from an end-user, you may send up to 5 messages in response within a 24-hour window. Each message received resets the 24-hour window and the 5 allotted messages. Sending the 6th message within a 24-hour window or sending a message outside of a 24-hour window will count towards rate-limiting.

Sending messages

Unlike other channels, Twitter does not use telephone numbers as identifiers for sender (from) and the recipient (to.number), instead it uses twitter user id which are unique identifiers of the Twitter accounts.