X

X OAuth 1.0a API

The OAuth 1.0a API from X, for oauth 1.0a.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

POST /oauth/request_token Obtain a request token #
GET /oauth/authorize Ask the user to authorize the app #
GET /oauth/authenticate Sign in with X #
POST /oauth/access_token Exchange the verifier for an access token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/x:x-oauth-1-0a-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

x-oauth-1-0a-api-openapi.yml Raw ↑
# generated: '2026-11-28'
# method: generated -- from the vendor's own documentation, endpoints only as documented (never-fabricate bar)
# source: https://docs.x.com/resources/fundamentals/authentication/api-reference
openapi: 3.1.0
info:
  title: X OAuth 1.0a API
  description: 'The three-legged OAuth 1.0a flow for acting on behalf of an X user: obtain a request token, send the user
    to authorize, and exchange the verifier for an access token. Documented at https://docs.x.com/resources/fundamentals/authentication/api-reference
    .'
  version: '1.0'
  x-generated-from: https://docs.x.com/resources/fundamentals/authentication/api-reference
  x-generated-by: stacks-gap-pass-2026-11-28
servers:
- url: https://api.x.com
tags:
- name: OAuth 1.0a
paths:
  /oauth/request_token:
    post:
      operationId: oauthRequestToken
      summary: Obtain a request token
      tags:
      - OAuth 1.0a
      parameters:
      - name: oauth_callback
        in: query
        required: true
        description: The URL the user is redirected to after authorizing, or oob for PIN-based flow.
        schema:
          type: string
      - name: x_auth_access_type
        in: query
        required: false
        description: 'Overrides the access level the app requests: read or write.'
        schema:
          type: string
      responses:
        '200':
          description: oauth_token, oauth_token_secret and oauth_callback_confirmed, form-encoded.
  /oauth/authorize:
    get:
      operationId: oauthAuthorize
      summary: Ask the user to authorize the app
      tags:
      - OAuth 1.0a
      parameters:
      - name: oauth_token
        in: query
        required: true
        description: The request token obtained from POST oauth/request_token.
        schema:
          type: string
      - name: force_login
        in: query
        required: false
        description: Forces the user to enter their credentials.
        schema:
          type: string
      - name: screen_name
        in: query
        required: false
        description: Prefills the username input box.
        schema:
          type: string
      responses: &id001
        '302':
          description: Redirects the user to the provider sign-in and authorization page.
  /oauth/authenticate:
    get:
      operationId: oauthAuthenticate
      summary: Sign in with X
      tags:
      - OAuth 1.0a
      parameters:
      - name: oauth_token
        in: query
        required: true
        description: The request token obtained from POST oauth/request_token.
        schema:
          type: string
      - name: force_login
        in: query
        required: false
        description: Forces the user to enter their credentials.
        schema:
          type: string
      - name: screen_name
        in: query
        required: false
        description: Prefills the username input box.
        schema:
          type: string
      responses: *id001
  /oauth/access_token:
    post:
      operationId: oauthAccessToken
      summary: Exchange the verifier for an access token
      tags:
      - OAuth 1.0a
      parameters:
      - name: oauth_token
        in: query
        required: true
        description: The request token returned with the callback.
        schema:
          type: string
      - name: oauth_verifier
        in: query
        required: true
        description: The verifier returned with the callback.
        schema:
          type: string
      responses:
        '200':
          description: oauth_token, oauth_token_secret, user_id and screen_name, form-encoded.
components:
  securitySchemes:
    oauth1:
      type: apiKey
      in: header
      name: Authorization
      description: OAuth 1.0a signed Authorization header.