diff --git a/mintlify/snippets/global-accounts/authentication.mdx b/mintlify/snippets/global-accounts/authentication.mdx index 0f2bd3ee..f34199e1 100644 --- a/mintlify/snippets/global-accounts/authentication.mdx +++ b/mintlify/snippets/global-accounts/authentication.mdx @@ -392,7 +392,7 @@ curl -X POST "$GRID_BASE_URL/auth/credentials" \ -H "Content-Type: application/json" \ -d '{ "type": "OAUTH", - "accountId": "EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002", + "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002", "oidcToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9..." }' ``` @@ -420,7 +420,7 @@ The lowest-friction credential type — works on any device with email access an ### Email OTP registration -Creating the credential triggers an OTP email to the address you pass. The user reads the code off the email and submits it through your UI. +Creating the credential triggers an OTP email to the customer email on file for the internal account. Do not include an `email` field in the request body; Grid resolves the address from the account's customer record. ```mermaid sequenceDiagram @@ -429,8 +429,8 @@ sequenceDiagram participant G as Grid participant E as Email - C->>IB: POST /my-backend/otp/register { email } - IB->>G: POST /auth/credentials { type: EMAIL_OTP, email, accountId } + C->>IB: POST /my-backend/otp/register { accountId } + IB->>G: POST /auth/credentials { type: EMAIL_OTP, accountId } G->>E: deliver OTP email G-->>IB: 201 AuthMethod IB-->>C: { credentialId } @@ -448,8 +448,7 @@ curl -X POST "$GRID_BASE_URL/auth/credentials" \ -H "Content-Type: application/json" \ -d '{ "type": "EMAIL_OTP", - "accountId": "EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002", - "email": "jane@example.com" + "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002" }' ``` @@ -458,7 +457,7 @@ curl -X POST "$GRID_BASE_URL/auth/credentials" \ ```json { "id": "AuthMethod:019542f5-b3e7-1d02-0000-000000000004", - "accountId": "EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002", + "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002", "type": "EMAIL_OTP", "nickname": "jane@example.com", "createdAt": "2026-04-19T12:00:00Z", @@ -507,7 +506,7 @@ Every Global Account starts with a single credential — the one used in the @@ -577,8 +576,7 @@ Requires an active session on an *existing* credential on the same account. The -H "Content-Type: application/json" \ -d '{ "type": "EMAIL_OTP", - "accountId": "EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002", - "email": "jane@example.com" + "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002" }' ``` @@ -587,7 +585,7 @@ Requires an active session on an *existing* credential on the same account. The ```json { "type": "EMAIL_OTP", - "payloadToSign": "{\"requestId\":\"7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21\",\"type\":\"EMAIL_OTP\",\"accountId\":\"EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002\",\"expiresAt\":\"2026-04-08T15:35:00Z\"}", + "payloadToSign": "{\"requestId\":\"7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21\",\"type\":\"EMAIL_OTP\",\"accountId\":\"InternalAccount:019542f5-b3e7-1d02-0000-000000000002\",\"expiresAt\":\"2026-04-08T15:35:00Z\"}", "requestId": "7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21", "expiresAt": "2026-04-08T15:35:00Z" } @@ -607,8 +605,7 @@ Requires an active session on an *existing* credential on the same account. The -H "Request-Id: 7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21" \ -d '{ "type": "EMAIL_OTP", - "accountId": "EmbeddedWallet:019542f5-b3e7-1d02-0000-000000000002", - "email": "jane@example.com" + "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002" }' ```