Skip to content
Back

Error: Invalid phone param when using users.create() despite valid input

  • 0
  • Auth
  • Cloud
Anthony Wai
22 Apr, 2025, 14:37

Hi everyone, I’m currently working on a backend with Appwrite and I’ve run into a persistent issue while trying to create a user using the users.create() method.

I keep getting the following error: Invalid 'phone' param: Phone number must start with a '+' and can have a maximum of fifteen digits.

Here’s what I’ve confirmed:

The phone number is in the correct format (+254111579473)

I’ve trimmed and validated the number in code

I also printed the character codes to verify there are no hidden characters

I’m using the Node.js SDK and Appwrite v1.6.2 (self-hosted)

My code looks like this:

const newUser = await users.create(sdk.ID.unique(), { email, password, phone: '+254111579473', name: username, });

Despite everything being valid, I keep getting the same error. Can anyone confirm if phone is supported in the users.create() method in this version? Or is there a workaround or update I should be aware of?

Any help would be really appreciated!

Thanks in advance.

TL;DR
Persistent error with users.create() method in Appwrite backend using Node.js SDK. Despite valid phone input (+254111579473), getting 'Invalid 'phone' param' error. Confirmed phone format, trimmed input, no hidden characters. using Appwrite v1.6.2. Any solutions or updates for users.create() method with phone input?
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more