Skip to navigation

Create a change-phone-number session

View as Markdown

Creates a device-bound session in which the user changes their phone number. Load sessionStartingPath in the Vlens iframe or WebView.

Authentication

ApiKeystring
Static API key issued to your tenant. Required on every request.

Request

This endpoint expects an object.
userPublicKeystringRequired

RSA public key generated on the device. See Iframe Integration.

userIdlongOptional
The user whose phone number is being changed.
userEmailstring or nullOptional
oldPhoneNumberstring or nullOptional
The user's current phone number.
newPhoneNumberstring or nullOptional
The new phone number. Must differ from the current one.
redirectUrlstring or nullOptional
Where to send the user when the session completes.
languagestring or nullOptional

UI language — AR or EN.

smsProviderintegerOptional

SMS provider for the OTP: 1 Infobip, 2 Vodafone, 3 Cequens, 4 Victory Link, 5 BroadNet, 6 Ezagel, 7 Orange.

Response

Session created.
sessionIdstring or nullOptionalformat: "uuid"
creationTimedatetimeOptional
sessionEnddatetimeOptional
sessionStartingPathstring or nullOptional
Append to your tenant's onboarding URL to open the session.
redirectUrlstring or nullOptional