---
title: "Twitter OAuth exchange"
method: POST
path: "/auth/oauth/twitter/exchange"
tags: ["auth"]
---

# Twitter OAuth exchange

`POST /auth/oauth/twitter/exchange`

Exchange Twitter/X OAuth code for JWTs (PKCE)

## Request body

- object
  - `code` string, required
  - `state` string, required

## Response `200`

Default Response

- object
  - `token` string, required
  - `refreshToken` string, required
  - `redirectTo` string

## Other responses

- `400` — Default Response
- `401` — Default Response
- `409` — Default Response
- `500` — Default Response
- `502` — Default Response
- `503` — Default Response
- `504` — Default Response

---

[API](https://skmtc.net/blockmatic/apis/basilic-api.md) · [All operations](https://skmtc.net/blockmatic/apis/basilic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blockmatic/basilic-api/versions/b2c23a2d8170/schema)
