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.
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" }
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
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
Thanks for calling the attention to this situation; I mentioned this to the docs team so it can be addressed.
@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.