---
title: "Link Auth"
method: POST
path: "/v1/auth/link"
tags: ["Authentication"]
---

# Link Auth

`POST /v1/auth/link`

Link an additional authentication method or external wallet to the currently authenticated user. Provide the authentication token from another completed login (for example, a SIWE wallet or OAuth account) and this endpoint will associate it with the user's existing wallet.

**Usage:**
1. Complete an authentication flow using `/auth/complete` to obtain the new authentication token
2. Call this endpoint with the token you want to link
3. Receive the full list of linked authentication profiles for the wallet

**Authentication:** Requires both client authentication (`x-client-id` or `x-secret-key`) and a wallet access token via `Authorization: Bearer <jwt>`.

## Request body

- object — Request body for linking an additional authentication method or external wallet to the currently authenticated user.
  - `accountAuthTokenToConnect` string, required — Authentication token for the account that should be linked to the currently authenticated wallet.

## Response `200`

Authentication method linked successfully. The response contains the updated list of linked authentication profiles.

- object — Response returned after successfully linking an additional authentication provider. The response includes all linked profiles for the user.
  - `linkedAccounts` union[], required — Updated list of authentication profiles linked to the wallet after the new account has been connected.
    - union — Authentication provider details with type-based discrimination
      - object — Google OAuth authentication provider details
        - `email` string, required
        - `emailVerified` boolean, required
        - `familyName` string
        - `givenName` string
        - `hd` string, required
        - `id` string, required
        - `locale` string, required
        - `name` string
        - `picture` string, required
        - `type` 'google', required
      - object — Facebook OAuth authentication provider details
        - `email` string
        - `firstName` string
        - `id` string, required
        - `lastName` string
        - `name` string
        - `picture` string
        - `type` 'facebook', required
      - object — Apple OAuth authentication provider details
        - `email` string
        - `emailVerified` boolean, required
        - `id` string, required
        - `isPrivateEmail` boolean, required
        - `type` 'apple', required
      - object — GitHub OAuth authentication provider details
        - `avatar` string, nullable
        - `id` string, required
        - `name` string, nullable
        - `type` 'github', required
        - `username` string, required
      - object — Discord OAuth authentication provider details
        - `avatar` string, required
        - `email` string, email
        - `emailVerified` boolean, required
        - `id` string, required
        - `type` 'discord', required
        - `username` string, required
      - object — Coinbase OAuth authentication provider details
        - `avatar` string
        - `id` string, required
        - `name` string, required
        - `type` 'coinbase', required
      - object — X (Twitter) OAuth authentication provider details
        - `id` string, required
        - `name` string, required
        - `type` 'x', required
        - `username` string, required
        - `profileImageUrl` string
      - object — TikTok OAuth authentication provider details
        - `id` string, required
        - `displayName` string, required
        - `avatarUrl` string, required
        - `unionId` string
        - `type` 'tiktok', required
      - object — Epic Games OAuth authentication provider details
        - `id` string, required
        - `type` 'epic', required
        - `displayName` string
        - `email` string, email
        - `emailVerified` boolean
        - `metadata` object, required
          - `accountId` string, required
          - `preferredUsername` string
          - `country` string
          - `region` string
          - `language` string
          - `sub` string
          - `name` string
      - object — Steam OAuth authentication provider details
        - `avatar` string
        - `id` string, required
        - `metadata` object, required
          - `avatar` object, required
            - `large` string
            - `medium` string
            - `small` string
          - `personaname` string
          - `profileurl` string
          - `realname` string
        - `type` 'steam', required
        - `username` string
      - object — Telegram OAuth authentication provider details
        - `firstName` string
        - `id` string, required
        - `lastName` string
        - `picture` string
        - `type` 'telegram', required
        - `username` string
      - object — Twitch OAuth authentication provider details
        - `avatar` string
        - `description` string
        - `email` string
        - `id` string, required
        - `type` 'twitch', required
        - `username` string, required
      - object — LINE OAuth authentication provider details
        - `avatar` string
        - `id` string, required
        - `type` 'line', required
        - `username` string
      - object — Farcaster authentication provider details
        - `fid` string, required
        - `id` string, required
        - `type` 'farcaster', required
        - `walletAddress` string
      - object — Passkey authentication provider details
        - `algorithm` string, required
        - `credentialId` string, required
        - `publicKey` string, required
        - `type` 'passkey', required
      - object — Email authentication provider details
        - `email` string, email, required
        - `id` string, required
        - `type` 'email', required
      - object — Pre-generated wallet authentication provider details
        - `id` string, required
        - `pregeneratedIdentifier` string, required
        - `type` 'pre_generation', required
      - object — Phone authentication provider details
        - `id` string, required
        - `phone` string, required
        - `type` 'phone', required
      - object — Sign-In with Ethereum (SIWE) authentication provider details
        - `id` string, required
        - `type` 'siwe', required
        - `walletAddress` string, required
      - object — Guest authentication provider details
        - `id` string, required
        - `type` 'guest', required
      - object — Backend authentication provider details (deprecated, use server instead)
        - `id` string, required
        - `type` 'backend', required
      - object — Server authentication provider details
        - `identifier` string, required
        - `type` 'server', required
      - object — Custom JWT authentication provider details
        - `authProviderId` string
        - `email` string
        - `id` string, required
        - `phone` string
        - `type` 'custom_jwt', required
        - `walletAddress` string
      - object — Custom auth endpoint authentication provider details
        - `authProviderId` string
        - `email` string
        - `id` string, required
        - `phone` string
        - `type` 'custom_auth_endpoint', required
        - `walletAddress` string

## Other responses

- `400` — Invalid request parameters
- `401` — Wallet authentication required. Include Authorization: Bearer <jwt> header.
- `429` — Rate limit exceeded - Please wait before trying again
- `502` — Third-party provider did not return any linked accounts after processing the request.

---

[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)
