Auth0 Home Blog Docs

create user and set name via API



The create new user API here:!/Users/post_users
doesn’t seem to support a ‘name’ field.

How do I set a user’s full name via the API?



To achieve what you mention, first, consider the following information that may be helpful to you.

As for the name attribute, this would automatically be set if a user signs in using a social provider (e.g. Facebook). For normal database connection users, the name attribute is not set.

You can still set any custom attributes in the user_metadata, either from the user’s profile in the dashboard, or use management API v2.

In this case, using the management API v2 you can perform a call at this endpoint!/Users/post_users and use this body:

 "connection": "Username-Password-Authentication",
 "email": "", 
"password": "1234",
 "user_metadata": { 
         "name" : "Heiker" 
"email_verified": false, 
"verify_email": false, 
"app_metadata": {} 

The result of the execution of that call generates the following response:

Response code: 201

Response body:

 "email": "", 
"user_metadata": {
 "name": "Heiker" },
 "email_verified": false,
 "user_id": "auth0|5997801134126e1816850df1",
 "picture": "",
 "identities":  { "connection": "Username-Password-Authentication", "user_id": "5997801134126e1816850df1", "provider": "auth0", "isSocial": false } ],
 "updated_at": "2017-08-19T00:02:25.730Z",
 "created_at": "2017-08-19T00:02:25.730Z" }

If you go to your dashboard, it would look like this:
![alt text][1]