Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x.com/llms.txt

Use this file to discover all available pages before exploring further.


title: Basic authentication sidebarTitle: Basic authentication keywords: [“basic authentication”, “HTTP basic auth”, “enterprise authentication”, “basic auth”, “HTTP authentication”, “enterprise API auth”] description: Many of X’s enterprise APIs require the use of HTTP Basic Authentication. To make a successful request to an API that requires Basic Authentication, you…---

Basic authentication

Many of X’s enterprise APIs require the use of HTTP Basic Authentication. To make a successful request to an API that requires Basic Authentication, you must pass a valid email address and password combination as an authorization header for each request. The email and password combination are the same ones that you will use to access the enterprise API console, and can be editted from within this console.  When building a request using Basic Authentication, make sure you add the Authentication: Basic HTTP header with encoded credentials over HTTPS. In the following cURL request example, you would replace <email_address> and <password> with your credentiails before sending the request:
curl -v --compressed -u<email_address>:<password>
    "https://gnip-api.x.com/search/30day/accounts/<account-name>/prod/counts.json?query=from%3Axdevelopers"
APIs that require basic authentication: * PowerTrack API enterprise * Decahose stream API enterprise * 30-Day Search API enterprise * Full-Archive Search API enterprise * Usage API enterprise