Authentication (Allauth Headless)

Change the phone number

Changed on

The following functionality is available:

  • Initiate the phone number change process for signed in users.
  • Change to a new phone number during the phone number verification process at signup for unauthenticated users. Note that this requires: ACCOUNT_PHONE_VERIFICATION_SUPPORTS_CHANGE = True.

In both cases, after posting a new phone number, proceed with the phone verification endpoint to confirm the change of the phone number by posting the verification code.

post/api/v2/allauth/app/v1/account/phone

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

client'app' | 'browser' required

The type of client accessing the API.

Headers

X-Session-Tokenstring

Session token. Only needed when client is equal to app.

Request body

phonestring required

Example request

{
  "phone": "+314159265359"
}

Response

Phone number change process initiated.

status202 required

Example response

{
  "status": 202,
  "data": [
    {
      "phone": "+314159265359",
      "verified": false
    }
  ]
}

Changes

    • info

      added the required property ////// to the response with the status