---
title: "Complete Auth"
method: POST
path: "/v1/auth/complete"
tags: ["Authentication"]
---

# Complete Auth

`POST /v1/auth/complete`

Complete the authentication flow and receive your wallet credentials. After initiating authentication, use this endpoint to submit the required verification data.

**Completion Methods:**
- **SMS/Email** - Submit the verification code you received
- **Passkey** - Provide the WebAuthn signature response
- **SIWE** - Submit your signed Ethereum message
- **Guest** - Create an ephemeral guest wallet
- **Custom (JWT, auth-payload)** - Send your JWT token or custom payload

**Response:**
- `isNewUser` - Whether this is a new wallet creation
- `token` - JWT token for authenticated API requests
- `type` - The authentication method used
- `userId` - Unique identifier for the authenticated user
- `walletAddress` - Your new or existing wallet address

**Next step - Verify your token:**
```javascript
// Verify the token and get complete wallet details (server-side)
fetch('/v1/wallets/me', {
  headers: { 
    'Authorization': 'Bearer ' + token,
    'x-secret-key': 'your-secret-key'
  }
})
.then(response => response.json())
.then(data => {
  console.log('Wallet verified:', data.result.address);
  console.log('Auth profiles:', data.result.profiles);
});
```

**Authentication:** Requires `x-client-id` header for frontend usage or `x-secret-key` for backend usage.

## Request body

- union — Request to complete authentication flow. Choose the same method used in initiate: sms, email, oauth, passkey, siwe, guest, or custom. The required fields depend on the authentication method.
  - object
    - `method` 'sms', required — Authentication method: SMS
    - `phone` string, required — Phone number that received the code
    - `code` string, required — Verification code received via SMS
  - object
    - `method` 'email', required — Authentication method: Email
    - `email` string, required — Email address that received the code
    - `code` string, required — Verification code received via email
  - object
    - `method` 'passkey', required — Authentication method: Passkey
    - `type` 'sign-up' | 'sign-in', required — Passkey operation type
    - `authenticatorData` string, required — Base64-encoded authenticator data
    - `credentialId` string, required — Base64-encoded credential ID
    - `serverVerificationId` string, required — Server verification ID from initiate response
    - `clientData` string, required — Base64-encoded client data JSON
    - `signature` string — Base64-encoded signature (for sign-in)
    - `origin` string — Origin of the request
    - `rpId` string — Relying party identifier
    - `username` string — Username for the passkey
    - `credential` object — Credential data for passkey registration
      - `publicKey` string, required — Public key for the credential
      - `algorithm` union, required — Algorithm used for the credential
        - 'RS256'
        - 'ES256'
  - object
    - `method` 'siwe', required — Authentication method: Sign-In with Ethereum
    - `signature` string, required — Hex-encoded signed SIWE message
    - `payload` string, required — The original SIWE payload that was signed
  - object
    - `method` 'custom', required — Authentication method: Custom
    - `type` 'jwt' | 'auth-payload', required — Custom authentication type
    - `jwt` unknown
    - `payload` unknown
  - object
    - `method` 'guest', required — Authentication method: Guest
    - `sessionId` string — Optional guest session ID - if not provided, a random one will be generated with no persistence guarantees.

## Response `200`

Authentication completed successfully. You now have wallet access.

- object — Successful authentication response. Returns wallet address plus authentication tokens.
  - `isNewUser` boolean, required — Whether this is a newly created user/wallet
  - `token` string, required — JWT authentication token for API access
  - `type` string, required — Type of authentication completed
  - `userId` string, required — Unique identifier for the authenticated user
  - `walletAddress` string, required — The wallet address

## Other responses

- `400` — Invalid credentials or request - Check your challenge ID and verification data
- `429` — Rate limit exceeded - Please wait before trying again

---

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