Skip to main content

Migrating from Express API v1 to v2

  • Apps created before July 31, 2026: v1 requests are automatically redirected to the v2 endpoint. No immediate action is required, but we recommend updating your codebase to call v2 directly.
  • Apps created after July 31, 2026: v1 access is banned. You must use v2 endpoints.
The change is minimal — only the URL paths change. All headers and request bodies remain the same. Update /v1/wallet to /v2/wallet and /v1/wallet/sign/* to /v2/wallet/sign/*.

Migrating from MWS (loginWithOIDC)

We’re deprecating MWS and moving all customers to Express API, which enables wallet operations without an iframe or going through Magic for authentication. All of your end users’ wallets have already been migrated to Express API and new wallets are already being created via the new system. There will be no downtime for you or your end users.
1

Fetch your Provider ID

Retrieve your new provider ID using the following request:
cURL
curl -X GET 'https://tee.express.magiclabs.com/v1/identity/provider' \
  -H 'X-Magic-Secret-Key: YOUR_MAGIC_SECRET_KEY'
One has already been created for all existing developers. While your existing providerId from the loginWithOIDC call will work temporarily as the X-OIDC-Provider-ID header, the old identifier will be deprecated soon.
2

Replace loginWithOIDC with the wallet endpoint

Update your authentication flow to use the following request instead of loginWithOIDC to get or create a wallet:
cURL
curl -X POST 'https://tee.express.magiclabs.com/v2/wallet' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -H 'X-Magic-API-Key: YOUR_MAGIC_API_KEY' \
  -H 'X-OIDC-Provider-ID: YOUR_OIDC_PROVIDER_ID' \
  -H 'X-Magic-Chain: ETH'
3

Update signing operations

Replace Magic SDK signing with TEE signing. See the signing operations page for detailed implementation, and the data preparation pages for specific chains:
4

Uninstall Magic SDK

Remove the magic-sdk package and any related extensions from your project:
npm uninstall magic-sdk @magic-ext/oidc
yarn remove magic-sdk @magic-ext/oidc