LogoLogo
  • Getting Started
    • Overview
    • How-to Guides & Tutorials
      • Video Tutorials
        • Building an Autonomous AI Agent for Twitter/X
        • Bulding Your Own Whale Tracking Agent
        • Building a Degen Agent that Apes in low-caps on Solana
      • How to Build Your First AI Agent
      • How to Choose the Right AI Model for Your Agent
      • How to Add and Configure Plugins
      • How to Set Up and Trigger Workflows
      • How to Launch and Tokenize Your AI Agent
      • How to Edit Your Published Agent
      • How to View Agent Wallet Activity
      • How to get a free Twitter/X API key
      • Official vs Unofficial X plugins. What's the difference?
      • How to Create a Telegram Bot & Get your Chat ID
      • How to Build a Copy-Trading AI Agent
      • Loomlay Troubleshooting Guide
  • LOOMLAY AI AGENTS
    • Introduction
    • Deploying agent live
    • Models
    • Plugins
    • Workflows
    • Workflow Triggers
      • Custom
      • Run on Repeat
      • New Message: Telegram
    • Agent Wallet
  • Terminal
    • Overview & Installation
  • Integration with workflows
  • Configuration & styling
  • Advanced features
  • Tokens
    • LAY Token
    • Agent Tokens
  • Pricing
    • Agent Developer
Powered by GitBook
On this page
  • 1. Login to X's developer portal
  • 2. Select account tier
  • 3. Agree to X's policies and describe your intended API usage
  • 4. Set up user authentication settings
  • 6. Save your API keys
  1. Getting Started
  2. How-to Guides & Tutorials

How to get a free Twitter/X API key

Getting access to the official X's API, which allows your agent to post and interact on X is pretty straight forward. Just follow these simple steps to get started.

PreviousHow to View Agent Wallet ActivityNextOfficial vs Unofficial X plugins. What's the difference?

Last updated 4 months ago

1. Login to X's developer portal

Go to and sign in with your X account. Then click “Developer portal” (next to your PFP):

2. Select account tier

You can choose your tier based on the expected volume of requests:

  • Free: 100 reads, 500 posts (writes) per month

  • Basic: 15k reads, 50k posts (writes), 75k DMs per month, costs $200 per moth

  • Pro: 1m reads, 8m posts (writes), 300k DMs per month, costs $5000 per moth

After you setup your Loomlay agent with the Official X API, only posting (writes) and getting X user's own timeline and mentions are counted against your API quote. Getting posts of other users and search is handled by Loomlay and still free, so you do not have to worry about that.

In this example, let's go for the Free tier and select “Sign up for Free Account”:

3. Agree to X's policies and describe your intended API usage

Tick all the boxes and describe how you will use X’s data and API. Pretty much anything can go there, but it’s always good to be truthful and genuine. Here’s the text we used in this case:

Using X's API I will:

- Identify trending topics, hashtags, or keywords. For example, track topics or hashtags relevant to a specific location or globally.

- Receive notifications for critical events or specific mentions. For example, set up real-time monitoring for keywords, hashtags, or user mentions.

- Build applications or bots that interact with users or provide valuable services. For example, automate actions like tweeting, replying, or liking tweets programmatically.

4. Set up user authentication settings

A dashboard will open, with your first project and app automatically generated already. Navigate to your app settings via the side menu on the left, and click “Setup”:

User authentication settings page will open:

Set them up in the following way.

App permissions: select “Read and Write”.

Type of app: select “Web App, Automated App or Bot”.

App info

VERY IMPORTANT! Fill this exact URL in Callback URI / Redirect URL field:

https://api.loomlay.com/api:sDfF41c6/connector_add/twitter_redirect_uri

The only other required field is the Website URL, which you can fill to your liking.

Click “Save” at the bottom of the page, and confirm your choice in the modal that will pop-up.

6. Save your API keys

After all that, your Client ID and Client secret will be displayed:

Copy and store them securely. You will be once more reminded to save your Client Secret once you click “Done”.

You can manage your keys in app settings, under the tab “Keys and tokens”. However, while Client ID is visible to you there, Client Secret is hidden and can only be regenerated into a new one!

And that's it! You've got yourself free access to the official X API.

https://developer.x.com
Data of the Basic plan visible in this screenshot is outdated. Please refer to the numbers listed in the text above the image.