Updating a secondary account

Overview

Our client can login our website using their email and can login our application using sms passwordless connections. In order to simplify things we link both account where the email account becomes the primary one.
You would like to let the user update their phone number, but it seems that once the sms account is linked as a secondary we cannot update the phone number anymore.
Is there a way to update the phone number once the sms account is linked ?

Applies To
  • secondary account
Solution

You can update a linked user’s data via the management API update user endpoint by passing the linked connection parameter in the body of the request.

For example:

 curl --location --request PATCH 'https://{DOMAIN}/api/v2/users/{PRIMARY_IDENTITY_ID}' \ 
 --header 'Authorization: Bearer ' \ 
 --header 'Content-Type: application/json' \ 
 --data-raw '{ "phone_number":"{NEW_PHONE_NUMBER}" "connection": "sms" }'
 

Recommended content

No recommended content found...