Linking and Unlinking Additional Auth Methods via thirdweb API

Common and core wallet functionality unlocked via simple APIs.

Linking and Unlinking Additional Auth Methods via thirdweb API

New Endpoints

We just shipped a pair of routes that make it painless to manage external wallets (via Sign-In-With-Ethereum aka SIWE) and other common authentication methods on user accounts. Both endpoints live under https://api.thirdweb.com and return fully normalized linked-account data so you don’t have to juggle different provider shapes.

POST /v1/auth/link

Link an additional authentication method or wallet to your account.

Authentication Required: Client token + Wallet token

Request Body:

{
  "accountAuthTokenToConnect": "string"
}

Response:

{
  "linkedAccounts": [
    {
      "type": "siwe" | "guest" | ...,
      "id": "string",
      "details": { ... }
    }
  ]
}

POST /v1/auth/unlink

Unlink an authentication provider from your account.

Authentication Required: Client token + Wallet token

Request Body:

{
  "type": "siwe" | "guest" | ...,
  "details": {
    "address": "0x...",        // optional
    "walletAddress": "0x...",  // optional
    "email": "...",            // optional
    "phone": "...",            // optional
    "id": "..."                // optional
  },
  "allowAccountDeletion": false  // optional
}

Note: At least one identifier in details is required.

Response:

{
  "linkedAccounts": [
    {
      "type": "siwe" | "guest" | ...,
      "id": "string",
      "details": { ... }
    }
  ]
}

Try it out now!