Cant save app_metadata with Postman when im creating a new user to Auth0

Hello. Im trying to add users through postman, but i need to set up the app_metadata while adding the user. If i add a user with that option , it dont show an error, but it add the user WITHOUT the app_metadata, its empty. Im i missing any configuration? Im adding users with this example.

{
  "connection": "Connection",
  "email": "john.doeexample@gmail.com",
  "username": "johndoe",
  "password": "Password12345",
  "phone_number": "+199999999999999",
  "user_metadata": {"color":"blue"},
  "email_verified": false,
  "verify_email": false,
  "phone_verified": false,
  "app_metadata":  {"plan": "full"}
}

In the body pane i select the raw checkbox and set the format as JSON(application/json).
Can you help me? im i missing something?

Hi @josevalverde93, your request body looks fine to me.

Can you verify which endpoint you’re submitting it to?
Can you simplify your request body and see if another value is causing the problem?

There is a good example of doing this here: https://auth0.com/docs/metadata/apis

Hi thanks for your answer. First im trying to add it from postman, i changed my request body to only needed fields, like connection, email, password and added the app metadata, but it didnt work as expected. it added the user but It didnt add the app_metadata still. i dont know whats happening, maybe a configuration error.

i tried to add the user from C# with the same data and it worked, including app_metadata, but from postman it didnt. I would like to know if im missing any configuration there.

I can’t imagine it being a problem with Postman. Can you provide the payloads you used in your C# example and the postman example? Have you tried the exact working payload over in Postman?

I solved the mistake! i was running the examples of the postman collection that you can download in the auth0 web site. I set up the environment, ant it had a default url for adding users. i was using that url. With that address , app_metadata didn’t save but it save the other attributes. After that i run the C# example, and worked well, so i change the url from the postman examples to the url from the C# code and set no environment . It worked as it should. Thanks for your time and help. i appreciate it.

1 Like

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