Update user attributes e.g. user phone number

In this example, we demonstrate how to update a user's attributes, such as their phone number, using the OneEntry API.

✅ Purpose of the scenario:
  • The user auth with a login and password
  • Enters a new phone number in the phone field
  • Saves user data in OneEntry Platform
✅ What you need:
  • A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
  • Registration form with marker "reg"
  • Form fields (attributes) with markers "email_reg", "password_reg", "name_reg", "phone_reg"
  • Valid email/phone number to receive the activation code
📌 Important:
  • These examples do not include error handling.
  • You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
  • Ensure that the formIdentifier used in the updateUser() method matches the one configured in your OneEntry project.
Loading sandbox…