Creating a user via the management API returns a 404?

The documentation here - Auth0 Management API v2 - doesn’t specify what the cause of a 404 response is?

I’m posting simply the following:-

{"email": "blob@mysite.com"}

The Management API I’m posting to also has the create:users scope added. It would be great if the API could return more useful info than the 404 - so does anyone know what the issue is please?

1 Like

Hi @s.murray,

Thanks for reaching out to the Auth0 Community!

I understand that you’ve encountered a 404 HTTP error when creating a user with the Management API.

First, I’d like to clarify that the 404 HTTP error is the not found error. And as you have observed, our documentation for the Create a users endpoint doesn’t have any associated error code for 404.

In this case, you may have likely encountered this error because of a typo in your URI. I recommend that you double-check that you have used the correctly URI, which should be in the format https://YOUR_DOMAIN.REGION.auth0.com/api/v2/users

During my tests, I attempted to create a user with your code snippet JSON object. However, it was not possible since, at the minimum, you’d need to specify the connection and password properties. In this case, I encountered the 400 errors.

Therefore, at the least, you’ll need to use something like the following to create a user:

{
  "email": "blob@mysite.com",
  "password":"YOUR_PASSWORD",
  "connection":"Username-Password-Authentication"
}

Hoped this helps!

Please let me know if you have any further questions.

Thank you.

1 Like

Thanks @rueben.tiow - I figured out it was the connection and password that were missing - worked fine after that.

Thanks again.

1 Like

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