# X (Twitter)

### Connecting a developer account

Due to API restrictions from X, you will need to create and connect an X developer account to start the connection process. You can create a new account or access your existing X developer account [here](https://developer.x.com/portal/dashboard).

Next, access the project and navigate to *Keys and tokens* (example shown below):

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c55f7c6ea554a632736fd52655d43b3f4dd523a3%2Fimage.png?alt=media" alt="Twitter developer portal showing project dashboard with Keys and tokens section highlighted"><figcaption></figcaption></figure>

When you click on the *Keys and tokens* button for your project, you should land in a page that looks like the following. Regenerate and save the API key, API secret, and OAuth client ID and secret as you will need to enter these into Relay.app:

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-8cb91d422bc00d06456da08b2e4f8cca7e44a7a1%2Fimage.png?alt=media" alt="Twitter developer project Keys and tokens page showing API key, API secret, and OAuth client credentials that need to be saved for Relay.app connection"><figcaption></figcaption></figure>

Next, navigate to the Settings tab, and from there, click to edit the *User authentication set up* settings:

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-9669ac99c881a5061c38ee262a5645094deed012%2Fimage.png?alt=media" alt="Twitter developer project settings tab with User authentication setup option to configure OAuth permissions"><figcaption></figcaption></figure>

Lastly, in this page, enable "Read and write" permissions, choose "Web App" as the type of app, and enter <https://run.relay.app/connect/callback/twitter> as the callback URL

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-e106755a49217e4bf6efbab19f32385edc24485b%2Fimage.png?alt=media" alt="Twitter OAuth authentication setup page showing read and write permissions configuration and callback URL field for Relay.app integration"><figcaption></figcaption></figure>

Lastly, in Relay.app, enter the API keys and OAuth client secret into the step connection dialog to complete the connection.

### I am trying to connect X but don't see my API Key and API Secret in the X developer platform.

To connect X to Relay.app, you'll need an API Key, API Secret, OAuth Client ID, and OAuth Client Secret, as described above.

The API Key and API Secret are only shown when you create the app for the first time in console.x.com under Apps > Create App.

The OAuth Client ID and OAuth Client Secret will then be available once you click into the app.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fxl2ySRz7y5isUBNcaQAl%2Fimage.png?alt=media&#x26;token=f6be0ff2-2ef5-45bb-82c8-d11fe85c86d1" alt="" width="188"><figcaption></figcaption></figure>

### Action rate limits

X rate-limits actions aggressively through their API. Relay.app is not able to circumvent those rate-limits. For convenience, these are the published limits for the actions we provide. If you encounter an error posting on X, then you may need to either stagger your requests to occur less frequently, or upgrade to a higher tier of paid [X developer account](https://developer.x.com/portal/dashboard). (Note that a developer account is distinct from X Premium or other paid X offerings.)

<table><thead><tr><th width="176.515625">Action</th><th width="183.11328125">Twitter Free Tier Limit</th><th width="184.765625">Twitter Basic Tier Limit</th><th>Twitter Pro Tier Limit</th></tr></thead><tbody><tr><td>Post tweet, reply to tweet, quote tweet</td><td>17 posts / <strong>day</strong></td><td>100 posts / <strong>day</strong></td><td>100 posts / <strong>15 minutes</strong></td></tr><tr><td>Retweet</td><td>1 post / <strong>15 minutes</strong></td><td>5 posts / <strong>15 minutes</strong></td><td>50 posts / <strong>15 minutes</strong></td></tr><tr><td>Follow user</td><td>1 follow / <strong>15 minutes</strong></td><td>5 follows / <strong>15 minutes</strong></td><td>50 follows / <strong>15 minutes</strong></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.relay.app/app-specific-faqs/x-twitter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
