You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: clarify two different verification record IDs in Account API (#1338)
Add info boxes and code comments to distinguish between:
- logto-verification-id (header): proves user identity
- newIdentifierVerificationRecordId (body): proves ownership of new identifier
This helps users understand which verification ID to use where when
linking email, phone, or social connections.
Copy file name to clipboardExpand all lines: docs/end-user-flows/account-settings/by-account-api.mdx
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,12 +251,23 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/verification-code/v
251
251
252
252
After verifying the code, you can now call [`PATCH /api/my-account/primary-email`](https://openapi.logto.io/operation/operation-updateprimaryemail) to update the user's email, set the `verificationId` to the request body as `newIdentifierVerificationRecordId`.
253
253
254
+
:::info[Two different verification record IDs]
255
+
256
+
This request requires two separate verification record IDs:
257
+
258
+
-**`logto-verification-id` (header)**: Proves the user's identity before making sensitive changes. Obtain this by [verifying the user's password](#verify-the-users-password) or [sending a verification code to the user's existing email or phone](#verify-by-sending-a-verification-code-to-the-users-email-or-phone).
259
+
-**`newIdentifierVerificationRecordId` (body)**: Proves ownership of the new email address. This is the `verificationRecordId` returned from the `POST /api/verifications/verification-code` call above.
260
+
261
+
:::
262
+
254
263
```bash
255
264
curl -X POST https://[tenant-id].logto.app/api/my-account/primary-email \
@@ -311,12 +322,23 @@ The `connectorData` is the data returned by the social connector after the user
311
322
312
323
Finally, you can use the [`POST /api/my-account/identities`](https://openapi.logto.io/operation/operation-adduseridentities) endpoint to link the social connection.
313
324
325
+
:::info[Two different verification record IDs]
326
+
327
+
This request requires two separate verification record IDs:
328
+
329
+
-**`logto-verification-id` (header)**: Proves the user's identity before making sensitive changes. Obtain this by [verifying the user's password](#verify-the-users-password) or [sending a verification code to the user's existing email or phone](#verify-by-sending-a-verification-code-to-the-users-email-or-phone).
330
+
-**`newIdentifierVerificationRecordId` (body)**: Identifies the social identity being linked. This is the `verificationRecordId` returned from the `POST /api/verifications/social` call above.
331
+
332
+
:::
333
+
314
334
```bash
315
335
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
0 commit comments