# Error calling database sign-up with user metadata

**URL:** <https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009>\
**Category:** Get Help\
**Tags:** database-connections\
**Created:** [June 10, 2017, 4:41pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009 "2017-06-10T16:41:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronak.sharma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ronak.sharma/32/12835_2.png) [@ronak.sharma](https://community.auth0.com/u/ronak.sharma)\
**Post date:** [June 10, 2017, 4:41pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/1 "2017-06-10T16:41:43Z")

</div>

While testing the sign-up endpoint `/dbconnections/signup` using Postman I’m getting error as:

```
{ "error": "invalid user_metadata type (expected object)" }

```

Below is my JSON data

```
{
    "client_id": "ClientId",
    "email": "ronak.sharma5248s@asd.com",
    "password": "Jambo0047",
    "connection": "Username-Password-Authentication",
    "user_metadata":"{ 'phone': '9898523236' }"
 }

```

If you remove `user_metadata` property from JSON, it works as expected.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [June 12, 2017, 3:29pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/2 "2017-06-12T15:29:32Z")

</div>

As the error states the `user_metadata` property should be an `object` and you’re currently passing a string.

Replace this (which is incorrect):

```
"user_metadata": "{ 'phone': '9898523236' }"

```

with this:

```
"user_metadata": { "phone": "9898523236" }

```

---

<div class="post-metadata">

**Author:** ![eric.barault](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric.barault/32/7758_2.png) [@eric.barault](https://community.auth0.com/u/eric.barault)\
**Post date:** [September 25, 2017, 2:09pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/3 "2017-09-25T14:09:26Z")

</div>

hi,  
for what it’s worth the example provided here is incorrect and passes the user metadata as a string: [https://auth0.com/docs/api/authentication?shell#signup](https://auth0.com/docs/api/authentication?shell#signup)

---

<div class="post-metadata">

**Author:** ![eric.barault](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric.barault/32/7758_2.png) [@eric.barault](https://community.auth0.com/u/eric.barault)\
**Post date:** [September 25, 2017, 2:09pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/4 "2017-09-25T14:09:26Z")

</div>

hi,  
for what it’s worth the example provided here is incorrect and passes the user metadata as a string: [https://auth0.com/docs/api/authentication?shell#signup](https://auth0.com/docs/api/authentication?shell#signup)

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 26, 2017, 4:15pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/5 "2017-09-26T16:15:05Z")

</div>

Thanks for calling the attention to this situation; I mentioned this to the docs team so it can be addressed.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 29, 2017, 9:43pm UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/6 "2017-09-29T21:43:34Z")

</div>

@eric.barault it’s now fixed and the docs mention that this needs to be an object with some additional constraints on the actual metadata properties contained within it.

---

<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:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/error-calling-database-sign-up-with-user-metadata/7009/7 "2018-03-02T05:54:33Z")

</div>


