Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ To use the programmatic API, you'll need your **Secret Key**:
<CodeGroup>
```bash List Domains icon="list"
curl -X GET 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX'
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX'
```

```bash Add Domains icon="plus"
curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '[
{
Expand All @@ -177,7 +177,7 @@ curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \

```bash Remove Domains icon="minus"
curl -X DELETE 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"access_type": "domain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ To use the programmatic API, you'll need your **Secret Key**:
<CodeGroup>
```bash List App IDs icon="list"
curl -X GET 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX'
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX'
```

```bash Add App IDs icon="plus"
curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '[
{
Expand All @@ -217,7 +217,7 @@ curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \

```bash Remove App IDs icon="minus"
curl -X DELETE 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"access_type": "bundle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ To use the programmatic API, you'll need your **Secret Key**:
<CodeGroup>
```bash List Redirects icon="list"
curl -X GET 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX'
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX'
```

```bash Add Redirects icon="plus"
curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '[
{
Expand All @@ -157,7 +157,7 @@ curl -X POST 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \

```bash Remove Redirects icon="minus"
curl -X DELETE 'https://api.dashboard.magic.link/v1/admin/access_whitelist' \
-H 'X-Magic-Secret-Key: sk_live_XXXXXXXX' \
-H 'X-Magic-Secret-Key: sk_v2_XXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"access_type": "redirect_url",
Expand Down
2 changes: 1 addition & 1 deletion embedded-wallets/wallets/features/wallet-pregen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The email address associated with the PreGen wallet. The user must authenticate
<CodeGroup>
```bash cURL icon="square-terminal"
curl -X POST 'https://api.magic.link/v1/admin/pregen/wallet' \
--header 'X-Magic-Secret-Key: sk_live_...' \
--header 'X-Magic-Secret-Key: sk_v2_...' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
Expand Down
2 changes: 1 addition & 1 deletion recipes/server-wallets/alchemy-smart-wallets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Add the following to your `.env.local`:

```bash .env.local
# Magic Server Wallet credentials
SERVER_WALLET_SECRET_KEY=sk_live_XXXXXXXXXXXX
SERVER_WALLET_SECRET_KEY=sk_v2_XXXXXXXXXXXX
NEXT_PUBLIC_OIDC_PROVIDER_ID=your-oidc-provider-id

# Alchemy
Expand Down
2 changes: 1 addition & 1 deletion server-wallets/core-api/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Core API uses standard HTTP status codes. Error responses have this shape:

**`MISSING_REQUIRED_HEADER`** (HTTP 403)
- **Cause**: The `x-magic-secret-key` header is missing
- **Solution**: Include `x-magic-secret-key: sk_live_XXXXXXXX` on every request
- **Solution**: Include `x-magic-secret-key: sk_v2_XXXXXXXX` on every request

**`INVALID_API_KEY`** (HTTP 403)
- **Cause**: The secret key is invalid or does not match a known application
Expand Down
2 changes: 1 addition & 1 deletion server-wallets/core-api/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Your `Secret Key` will be used for all calls to the Core API.
Core API requires authentication using your Magic secret key for all requests:

<ParamField header="x-magic-secret-key" type="string" required>
Your Magic secret key for service authentication. Format: `sk_live_XXXXXXXX`
Your Magic secret key for service authentication. Format: `sk_v2_` followed by 64 hexadecimal characters. Keys created before this format start with `sk_live_` and keep working until you roll them.
</ParamField>

<Warning>
Expand Down
10 changes: 5 additions & 5 deletions server-wallets/core-api/signing-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Sign Ethereum and EVM-compatible chain transactions.
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_transaction' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"wallet_id": "e982b4a3-14d3-4d66-a3ac-fadfc3xxxxxx",
Expand All @@ -45,7 +45,7 @@ Sign Solana blockchain transactions.
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_transaction' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"wallet_id": "e982b4a3-14d3-4d66-a3ac-fadfc3xxxxxx",
Expand All @@ -61,7 +61,7 @@ Sign Bitcoin blockchain transactions.
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_transaction' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"wallet_id": "e982b4a3-14d3-4d66-a3ac-fadfc3xxxxxx",
Expand Down Expand Up @@ -136,7 +136,7 @@ Sign arbitrary data using keccak256 hash (EVM only).
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_data' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"wallet_id": "e982b4a3-14d3-4d66-a3ac-fadfc3xxxxxx",
Expand Down Expand Up @@ -206,7 +206,7 @@ Sign an arbitrary message using a Solana wallet.
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_message' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"wallet_id": "e982b4a3-14d3-4d66-a3ac-fadfc3xxxxxx",
Expand Down
8 changes: 4 additions & 4 deletions server-wallets/core-api/v1-to-v2-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Replace `encryption_context` with `auth_jwt` — the user's JWT from your identi
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v1/api/wallet' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"encryption_context": "hashed_passcode",
"network": "eth_mainnet",
Expand All @@ -40,7 +40,7 @@ curl -X POST 'https://tee.magiclabs.com/v1/api/wallet' \
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"auth_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"network": "eth_mainnet",
Expand All @@ -60,7 +60,7 @@ Replace `encryption_context` with `op_jwt`. The `access_key` and `wallet_id` rem
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v1/api/wallet/sign_data' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"encryption_context": "hashed_passcode",
"raw_data_hash": "0xabc...",
Expand All @@ -73,7 +73,7 @@ curl -X POST 'https://tee.magiclabs.com/v1/api/wallet/sign_data' \
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet/sign_data' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"op_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"raw_data_hash": "0xabc...",
Expand Down
6 changes: 3 additions & 3 deletions server-wallets/core-api/wallet-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Creates a new wallet group for organizing wallets.
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v1/api/wallet_group' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"metadata": {
"resource_id": "customer-resource-id"
Expand Down Expand Up @@ -67,7 +67,7 @@ Retrieve all wallet groups for your application.

```bash cURL icon="square-terminal"
curl -X GET 'https://tee.magiclabs.com/v1/api/wallet_groups' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX'
-H 'x-magic-secret-key: sk_v2_XXXXXXXX'
```

**Response:**
Expand Down Expand Up @@ -102,7 +102,7 @@ Create a new wallet for a user. In v2, the wallet is cryptographically bound to
```bash cURL icon="square-terminal"
curl -X POST 'https://tee.magiclabs.com/v2/api/wallet' \
-H 'Content-Type: application/json' \
-H 'x-magic-secret-key: sk_live_XXXXXXXX' \
-H 'x-magic-secret-key: sk_v2_XXXXXXXX' \
-d '{
"auth_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGgueW91cmFwcC5jb20iLCJzdWIiOiJ1c2VyXzEyMzQ1NiIsImF1ZCI6Imh0dHBzOi8vdGVlLm1hZ2ljbGFicy5jb20iLCJpYXQiOjE3NTE2NzIwMDAsImV4cCI6MTc1MTY3MjMwMH0.SIGNATURE",
"network": "mainnet",
Expand Down
2 changes: 1 addition & 1 deletion server-wallets/express-api/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Your Magic API key for service authentication.
</ParamField>

<ParamField header="X-Magic-Secret-Key" type="string">
Alternative to API key - your Magic secret key for service authentication.
Alternative to API key - your Magic secret key for service authentication. Format: `sk_v2_` followed by 64 hexadecimal characters. Keys created before this format start with `sk_live_` and keep working until you roll them.
</ParamField>

<ParamField header="X-OIDC-Provider-ID" type="string" required>
Expand Down
Loading