Add an identity (social identity) to the user. A logto-verification-id header is required when the user has at least one security verification method: password, primary email, or primary phone. The header can be omitted only when the user has none of these methods. A verification record for the new social identity is always required.
Responses
-
The identity was added successfully.
-
The request body is invalid or the social identity field is not editable.
-
Permission denied, recent user authentication is required or the access token does not include the
identitiesscope. -
Forbidden
-
The new verification record is invalid or the identity is already in use.
POST
/api/my-account/identities
curl \
--request POST 'https://[tenant_id].logto.app/api/my-account/identities' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"newIdentifierVerificationRecordId": "string"
}'
Request examples
{
"newIdentifierVerificationRecordId": "string"
}