Auth

GET /api/auth/x/connect

Start X (Twitter) OAuth 2.0 PKCE sign-in/sign-up flow.

Auth: None

Response:

{
  "url": "https://twitter.com/i/oauth2/authorize?..."
}

Redirect the user to the returned url. After authorization, X redirects to your callback.


GET /api/auth/x/callback

OAuth callback handler. Creates a new account (with auto-generated Base + Solana wallets and default settings) or signs in an existing user.

Auth: None Query Params: state, code (set by X OAuth redirect)

Response: 302 Redirect to {FRONTEND_URL}/auth/callback?token={jwt}


POST /api/auth/privy/login

Authenticate via Privy access token. Creates account if new user.

Auth: None (Privy token in body)


GET /api/auth/me

Get authenticated user profile with wallets and settings.

Auth: Required

Response:


POST /api/auth/logout

Logout the current user.

Auth: Required

Response:


POST /api/auth/connect/telegram

Link a Telegram account for trade notifications. Returns a 6-character connect code.

Auth: Required

Request Body:

Response:


DELETE /api/auth/account

Permanently delete the user account and all associated data (wallets, trades, settings).

Auth: Required

Response:

Last updated

Was this helpful?