Create User API

Hello!

I need to create a user API to allow admins to create a user account from the user interface (from my end using react).

I need to create a new user and add their email and phone number so that users can alternatively login using the passwordless feature that’ll send them an SMS to the phone number added in the create user request.

What is the correct API request to create a new user?
I looked over the documentation but unsure on how I should implemented the functionality
Is there a sample project I could use to achieve this , or can this be achieved without coding and simply from the auth0 dashboard?

Thank you,

Hi @ABCTesting , welcome to Auth0!

Auth0 supply a GUI way to create users under registered with Auth0 database connections:

And to create users under passwordless connections (connection=email or connection=sms) - there’s a Management API endpoint for that - Auth0 Management API v2.

Please let me know any questions!

Thank you for your response,
I have one more doubt, would it be possible to link a primary email : testing@gmail.com for example and a phone number at the same time in the create user API request from the management API ?
When using the connection type: sms, it only takes the phone number, and when using the connection type : Username-Password-Authentication, it doesn’t allow me to add a phone number.

I need to allow users to have the option to either login with their email, or quickly login using Passwordless approach and get an SMS via their phone number that was added to their account during the create user API process

is this possible? and if so How?

Hi @ABCTesting ,

The New Universal Login Page (login page hosted by Auth0) can be set to use: social login (like google) + passwordless but not Username-Password-Authentication + passwordless. So, unfortunately, what you are looking for is not something out-of-the-box that Auth0 provides.

This doc (the problem statement) shares steps to created a username-password account with Auth0 Actions while the user logs in via passwrodless and link them later together to have phone + email data on the user profile. This just creates a pipeline of passwordless + username-password at the login instead of setting separate connections to be chosen but may be a reference for you.

This is the management API endpoint for linking accounts.
Client side linking and server side linking.

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