# Create user: phone\_number madness

**URL:** <https://community.auth0.com/t/create-user-phone-number-madness/67342>\
**Category:** Get Help\
**Created:** [August 3, 2021, 11:41pm UTC](https://community.auth0.com/t/create-user-phone-number-madness/67342 "2021-08-03T23:41:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan.garbora](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/juan.garbora/32/30914_2.png) [@juan.garbora](https://community.auth0.com/u/juan.garbora)\
**Post date:** [August 3, 2021, 11:41pm UTC](https://community.auth0.com/t/create-user-phone-number-madness/67342/1 "2021-08-03T23:41:25Z")

</div>

It’s not easy to understand … the phone number field …

The documentation says it optional

_phone\_numberstring (optional)  
 **The user’s phone number (following the E.164 recommendation), only valid for users from SMS connections.**_

my tries:

#1 request

```auto
{
  "email": "adriana.will@yahoo.com",
  "phone_number": "",
  ...
  "connection": "Username-Password-Authentication",
  ...
}

```

Response

```auto
Payload validation error: 'String does not match pattern ^\\+[0-9]{1,15}$: ' on property phone_number (The user's phone number (following the E.164 recommendation), only valid for users from SMS connections).

```

#2 request (without phone\_number)

```auto
{
  "email": "adriana.will@yahoo.com",
...
}

```

Response

```auto
Payload validation error: 'Expected type string but found type null' on property phone_number (The user's phone number (following the E.164 recommendation), only valid for users from SMS connections)

```

#3 request

```auto
{
  "email": "adriana.will@yahoo.com",
  "phone_number": "+113407178302",
  ...
  "connection": "Username-Password-Authentication",
...
}

```

Response

```auto
\\\"phone_number\\\" is not allowed\",\"errorCode\":\"invalid_body\"

```

Anyone please ? What should I put ?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [August 4, 2021, 4:02pm UTC](https://community.auth0.com/t/create-user-phone-number-madness/67342/3 "2021-08-04T16:02:48Z")

</div>

Hi @juan.garbora,

Welcome to the Auth0 Community!

I am able to successfully send this payload to a non-SMS connection:

```auto
{
  "email":"test@test.com",
  "connection":"Username-Password-Authentication",
  "password":"password"
}

```

Can you try that payload and let me know?

---

<div class="post-metadata">

**Author:** ![juan.garbora](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/juan.garbora/32/30914_2.png) [@juan.garbora](https://community.auth0.com/u/juan.garbora)\
**Post date:** [August 4, 2021, 5:20pm UTC](https://community.auth0.com/t/create-user-phone-number-madness/67342/4 "2021-08-04T17:20:02Z")

</div>

Thank you. That works !

Maybe you should update your API documentation with that body example.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 19, 2021, 5:20pm UTC](https://community.auth0.com/t/create-user-phone-number-madness/67342/5 "2021-08-19T17:20:28Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
