---
title: "Register Session"
method: POST
path: "/customer/session"
tags: ["Account Session"]
---

# Register Session

`POST /customer/session`

## Request

- Base URL: `https://api.twitterapis.com/twitter`
- URL: `https://api.twitterapis.com/twitter/customer/session`
- Auth: HTTP bearer

Register your X session cookies so write actions (like, retweet, bookmark, follow, create or delete a tweet) and private-data reads (home timeline, bookmarks, likes, DMs, followers-you-know) run as your account. Supply auth_token and ct0 once; the session is stored against your API key and applied automatically. This call is free. Cost: Free per call.

## Request body

- object
  - `auth_token` string, required: The auth_token cookie value from a logged-in x.com browser session.
  - `ct0` string, required: The ct0 CSRF cookie value from the same x.com browser session.
  - `user_agent` string: Browser user-agent to send with session requests. Defaults to a current Chrome UA if omitted.
  - `proxy_url` string: HTTP or SOCKS proxy URL the session egresses through, for example http://user:pass@host:port. This is a property of the session, so every call made with this API key on this session uses it, reads as well as writes. Defaults to direct, which means we choose the egress.

## Response `200`

Register your auth_token and ct0 cookies once so every write and private read acts as your account, or pass them per call as x-auth-token / x-ct0 headers.

- object
  - `ok` boolean: True when the session is stored.
  - `message` string: Human-readable confirmation.
  - `username` string, nullable: The X handle resolved from the session, or null when it could not be resolved.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `429`: Rate limited
- `5XX`: Server error

---

[API](https://skmtc.dev/twitterapis/apis/twitterapis-api.md) · [All operations](https://skmtc.dev/twitterapis/apis/twitterapis-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twitterapis/apis/twitterapis-api/revisions/a33ce0fedb3c?raw)
