# Twitter

{% hint style="danger" %}
Twitter has temporarily discontinued Twitter integrations due to modifications made by Twitter to its APIs. This includes limitations on the number of requests raised per minute, plus substantial pricing changes.
{% endhint %}

## Prerequisites

In order to integrate Twitter with your Bot, you will need the following:

* A [Twitter account](https://twitter.com) with Direct Messages access

### Direct Messages

In order for your bot to receive direct messages from anyone (including accounts it does not follow), the option must be enabled in Twitter’s settings. Go to Twitter’s [Direct Messages](https://twitter.com/settings/direct_messages) settings and check "Allow message requests from everyone". Be sure to save your changes!

![Twitter Permissions](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FgActudr574vONkOtB7wP%2Ftwitter_direct_messages.png?alt=media\&token=5fde4e3f-64cb-44f1-923a-0c847a5bdc35)

Once this is done and you have Linked to Twitter, when a user sends a direct message (DM) to your Twitter account, your BotDistrikt bot will reply to them.

## Setup

From your bot account, go to **Integrations**

Select **Twitter**

![Twitter Integration](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FE0fU94DLJSDefFEGdvsh%2FScreenshot%202021-10-21%20at%2012.12.53%20PM.png?alt=media\&token=9144e945-d3a7-4329-9cc5-2978001f62f7)

Click on **Sign in with Twitter**

![Sign in with Twitter](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FRPjXyTKuFtlpnMQNYDoa%2FScreenshot%202021-10-21%20at%2012.15.02%20PM.png?alt=media\&token=bf9d7807-5e04-4981-b342-db660cbc26bd)

Authorize BotDistrikt to access your account

![Authorize BotDistrikt](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2F3ZA7GnsZSINAO9cMRWvh%2FScreenshot%202021-10-21%20at%2012.17.05%20PM.png?alt=media\&token=ce7bc415-2c69-4b7b-849f-1a3147238a61)

You will be redirected to the BotDistrikt Twitter page.&#x20;

Your account details appear on the integration card.

Click on **Link to Twitter.**

![Sample Bot Integration with Twitter](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FteR8GLMpcBA1KAWrWbIO%2FScreenshot%202021-10-21%20at%2012.18.25%20PM.png?alt=media\&token=e225f722-3229-40be-8d17-5d8f8b879b33)

Your bot is now live on your Twitter Account.

![Live Twitter Bot](https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2Ff0l9B4d71eUNGDA9Oc4e%2FScreenshot%202021-10-21%20at%2012.20.12%20PM.png?alt=media\&token=b0b51500-2132-4278-a871-6ff484c8c583)
