---
updatedAt: 2026-09-07T19:02:38.000Z
agentTools:
  projectIndex: https://docs.opensea.io/llms.txt
---

# Exchange a scoped token for an access token

Exchanges an opaque scoped token (personal access token) for a short-lived access token that satisfies `WalletAuth` on wallet-scoped endpoints. Send the returned `accessToken` as `Authorization: Bearer <token>`.

This is the credential path for headless callers that hold no signing key: the scoped token in the request body is the only credential, so no session cookie, wallet signature, or API key is required. The alternative is the OAuth 2.1 authorization-code flow described by the `WalletAuth` security scheme.

Failures are deliberately opaque. An unknown, revoked, rotated, or non-scoped subject token and a disabled integration all return the same 403 `Token exchange is not available`, so a 403 is not by itself evidence that the endpoint is unavailable.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenSea API",
    "description": "The API for OpenSea",
    "contact": {
      "name": "OpenSea",
      "url": "https://www.opensea.io",
      "email": "contact@opensea.io"
    },
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.opensea.io",
      "description": "OpenSea API server"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Auth Endpoints",
      "description": "Authentication endpoints for obtaining an API key and for exchanging a scoped token for a short-lived wallet access token"
    }
  ],
  "paths": {
    "/api/v2/auth/tokens/exchange": {
      "post": {
        "tags": [
          "Auth Endpoints"
        ],
        "summary": "Exchange a scoped token for an access token",
        "description": "Exchanges an opaque scoped token (personal access token) for a short-lived access token that satisfies `WalletAuth` on wallet-scoped endpoints. Send the returned `accessToken` as `Authorization: Bearer <token>`.\n\nThis is the credential path for headless callers that hold no signing key: the scoped token in the request body is the only credential, so no session cookie, wallet signature, or API key is required. The alternative is the OAuth 2.1 authorization-code flow described by the `WalletAuth` security scheme.\n\nFailures are deliberately opaque. An unknown, revoked, rotated, or non-scoped subject token and a disabled integration all return the same 403 `Token exchange is not available`, so a 403 is not by itself evidence that the endpoint is unavailable.",
        "operationId": "exchange_scoped_token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Access token minted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenExchangeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request body failed validation, for example a `subjectToken` outside the 10 to 8192 character range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Token exchange is not available. Returned for an unknown, revoked, or non-scoped subject token as well as for a disabled integration; the two are not distinguishable by design.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Body could not be read: malformed JSON, a missing required field, or an unsupported `subjectTokenType`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exchange failed after the token was minted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Upstream auth service error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Upstream auth service temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "AuthScope": {
        "type": "string",
        "description": "OAuth-style scope recognized by the OpenSea API for wallet-authenticated requests",
        "enum": [
          "read:eligibility",
          "read:favorites",
          "read:social",
          "read:tools",
          "read:wallets",
          "write:favorites",
          "write:social",
          "write:tools",
          "write:orders",
          "write:drops",
          "write:collections",
          "write:profile",
          "write:wallets"
        ],
        "example": "read:favorites",
        "x-enum-descriptions": [
          "Check drop eligibility for authenticated wallet",
          "View favorites and watchlist for authenticated account",
          "View follows, watches, followers, and following for the authenticated account",
          "View saved tools and toolkits for the authenticated account",
          "View wallet state for the authenticated account, currently agent ownership relationships including pending proposals",
          "Add and remove favorites and watchlist entries for authenticated account",
          "Follow, unfollow, watch, and unwatch profiles, and link or unlink an X account, for the authenticated account",
          "Save and remove tools and manage toolkits for the authenticated account",
          "Cancel orders on behalf of authenticated account",
          "Manage Creator Studio drops for authenticated account",
          "Modify collection metadata for authenticated account",
          "Modify profile settings for authenticated account",
          "Link, unlink, manage wallet visibility, and declare agent relationships for the authenticated account"
        ],
        "x-enum-display-names": [
          "Check drop eligibility",
          "View favorites and watchlist",
          "View social relationships",
          "View saved tools and toolkits",
          "View linked wallets and agent relationships",
          "Manage favorites and watchlist",
          "Manage social relationships",
          "Manage saved tools and toolkits",
          "Cancel orders",
          "Creator Studio drop management",
          "Collection metadata editing",
          "Profile editing",
          "Manage linked wallets"
        ],
        "x-enum-groups": [
          "read",
          "read",
          "read",
          "read",
          "read",
          "write",
          "write",
          "write",
          "write",
          "write",
          "write",
          "write",
          "write"
        ],
        "x-enum-endpoints": [
          [
            "/api/v2/drops/{slug}/eligibility"
          ],
          [
            "/api/v2/account/{address}/favorites",
            "/api/v2/account/{address}/token_watchlist",
            "/api/v2/account/{address}/perpetual_watchlist"
          ],
          [
            "/api/v2/accounts/{address_or_username}/relationship",
            "/api/v2/accounts/{address_or_username}/followers",
            "/api/v2/accounts/{address_or_username}/following"
          ],
          [
            "/api/v2/saved-tools",
            "/api/v2/toolkits",
            "/api/v2/toolkits/{toolkit_slug}"
          ],
          [
            "/api/v2/accounts/agent-relationships"
          ],
          [
            "/api/v2/watchlist"
          ],
          [
            "/api/v2/accounts/{address_or_username}/follow",
            "/api/v2/accounts/{address_or_username}/watch",
            "/api/v2/accounts/social/x/link",
            "/api/v2/accounts/social/x/link/{link_id}",
            "/api/v2/accounts/social/x"
          ],
          [
            "/api/v2/saved-tools",
            "/api/v2/toolkits",
            "/api/v2/toolkits/{toolkit_id}/save"
          ],
          [
            "/api/v2/orders/chain/{chain}/protocol/{protocol_address}/{order_hash}/cancel"
          ],
          [
            "/api/v2/drops/{slug}",
            "/api/v2/drops/{slug}/allowlist",
            "/api/v2/drops/{slug}/allowlist/validate",
            "/api/v2/drops/{slug}/prereveal-item",
            "/api/v2/drops/{slug}/items",
            "/api/v2/drops/{slug}/items/media",
            "/api/v2/drops/{slug}/items/media/save-batch",
            "/api/v2/drops/{slug}/items/manifest",
            "/api/v2/drops/{slug}/items/{token_id}",
            "/api/v2/drops/{slug}/metadata/ipfs",
            "/api/v2/drops/{slug}/metadata/ipfs/{workflow_execution_id}",
            "/api/v2/drops/{slug}/publish",
            "/api/v2/drops/{slug}/unpublish"
          ],
          [
            "/api/v2/collections/{slug}",
            "/api/v2/collections/{slug}/metadata",
            "/api/v2/collections/{slug}/visibility",
            "/api/v2/collections/{slug}/images/{image_type}",
            "/api/v2/collections/{slug}/media/{placement}",
            "/api/v2/collections/{slug}/pricing_currency",
            "/api/v2/collections/{slug}/creator_fee_enforcement",
            "/api/v2/collections/{slug}/refresh"
          ],
          [
            "/api/v2/profile",
            "/api/v2/profile/username",
            "/api/v2/profile/images",
            "/api/v2/profile/nft-pfp",
            "/api/v2/profile/shelves",
            "/api/v2/profile/shelves/{shelf_id}"
          ],
          [
            "/api/v2/accounts/agent",
            "/api/v2/accounts/agent-relationships",
            "/api/v2/accounts/agent-relationships/confirm",
            "/api/v2/accounts/wallets/siwx",
            "/api/v2/accounts/wallets/siwx/nonce",
            "/api/v2/accounts/wallets/{wallet}",
            "/api/v2/accounts/wallets/{wallet}/private"
          ]
        ],
        "x-enum-mcp-tools": [
          [
            "check_drop_eligibility"
          ],
          [
            "get_favorites"
          ],
          [
            "view_social_graph"
          ],
          [
            "list_saved_tools",
            "list_toolkits",
            "get_toolkit"
          ],
          [
            "get_agent_relationships"
          ],
          [
            "manage_watchlist"
          ],
          [
            "manage_social_graph",
            "link_x_account"
          ],
          [
            "save_tool",
            "unsave_tool",
            "create_toolkit",
            "save_toolkit",
            "unsave_toolkit"
          ],
          [
            "cancel_orders"
          ],
          [
            "manage_drops"
          ],
          [
            "manage_collections"
          ],
          [
            "manage_profile"
          ],
          [
            "manage_wallets",
            "manage_agent_account"
          ]
        ]
      },
      "TokenExchangeRequest": {
        "type": "object",
        "description": "Scoped-token exchange request",
        "properties": {
          "subjectToken": {
            "type": "string",
            "description": "The opaque scoped token (personal access token) to exchange. A session JWT is not accepted.",
            "maxLength": 8192,
            "minLength": 10
          },
          "subjectTokenType": {
            "type": "string",
            "default": "ACCESS_TOKEN",
            "description": "Type of the presented subject token",
            "enum": [
              "ACCESS_TOKEN"
            ]
          }
        },
        "required": [
          "subjectToken"
        ]
      },
      "TokenExchangeResponse": {
        "type": "object",
        "description": "Minted access token",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "Bearer token to send as `Authorization: Bearer <token>`"
          },
          "expiresIn": {
            "type": "integer",
            "format": "int64",
            "description": "Token lifetime in seconds, when the issuer reports one"
          },
          "scope": {
            "type": "string",
            "description": "Space-delimited scopes on the minted token, when present"
          },
          "tokenScopes": {
            "type": "array",
            "description": "Scopes bound to the presented scoped token at mint time. Requests are authorized against these, not the full account scope set.",
            "items": {
              "$ref": "#/components/schemas/AuthScope"
            },
            "uniqueItems": true
          },
          "tokenType": {
            "type": "string",
            "description": "Token type",
            "example": "Bearer"
          }
        },
        "required": [
          "accessToken",
          "tokenType"
        ]
      },
      "AuthErrorResponse": {
        "type": "object",
        "description": "Error envelope returned by the authentication endpoints",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "HTTP status code"
              },
              "message": {
                "type": "string",
                "description": "Human-readable reason"
              },
              "status": {
                "type": "string",
                "description": "Status name"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "API key required for authentication",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Data & Discovery",
      "tags": [
        "Chain Endpoints",
        "Account Endpoints",
        "Collection Endpoints",
        "NFT Endpoints",
        "Contract Endpoints",
        "Token Endpoints",
        "Search Endpoints",
        "Signal Endpoints"
      ]
    },
    {
      "name": "Marketplace & Trading",
      "tags": [
        "Listing Endpoints",
        "Offer Endpoints",
        "Order Endpoints",
        "Swap Endpoints",
        "Drops Endpoints"
      ]
    },
    {
      "name": "Analytics & Events",
      "tags": [
        "Analytics Endpoints"
      ]
    },
    {
      "name": "Tools [Beta]",
      "tags": [
        "Tool Endpoints [Beta]"
      ]
    },
    {
      "name": "Transactions",
      "tags": [
        "Transaction Endpoints"
      ]
    },
    {
      "name": "Authentication",
      "tags": [
        "Auth Endpoints"
      ]
    }
  ]
}
```