Quickstart (Developers)

Authenticate a user and fetch their wallets.

1) Initialize OAuth (PKCE)

curl -X POST https://<BASE_URL>/oauth/init \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "google",
    "redirect_uri": "https://yourapp.example/callback",
    "state": "random-uuid",
    "code_challenge": "base64url_sha256(code_verifier)"
  }'

2) Handle callback → Complete login

Your app receives wallet_oauth_provider, wallet_oauth_state, and wallet_oauth_code. Call /login:

curl -X POST https://<BASE_URL>/login \
  -H "Content-Type: application/json" \
  -d '{
    "type": "GoogleOAuth",
    "data": {
      "state": "<wallet_oauth_state>",
      "code": "<wallet_oauth_code>",
      "code_verifier": "<original_code_verifier>"
    }
  }'
curl https://<BASE_URL>/session -b cookies.txt

Last updated