# User creation: management API return 200 but user does not exist

**URL:** <https://community.auth0.com/t/user-creation-management-api-return-200-but-user-does-not-exist/112280>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [July 27, 2023, 3:52pm UTC](https://community.auth0.com/t/user-creation-management-api-return-200-but-user-does-not-exist/112280 "2023-07-27T15:52:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.piga](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@a.piga](https://community.auth0.com/u/a.piga)\
**Post date:** [July 27, 2023, 3:52pm UTC](https://community.auth0.com/t/user-creation-management-api-return-200-but-user-does-not-exist/112280/1 "2023-07-27T15:52:24Z")

</div>

Hi, we have some errors creating users with management API.  
No log errors are present and call is ok, but users doesn’t exist on our env (and variables are correct)!  
This error happen sometimes for some period (using same code and same calls) and then disappear without reason. It’s very strange. Can someone help me?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 28, 2023, 12:01am UTC](https://community.auth0.com/t/user-creation-management-api-return-200-but-user-does-not-exist/112280/3 "2023-07-28T00:01:09Z")

</div>

Hi @a.piga,

Welcome to the Auth0 Community!

Could you please share with me the exact code you used to create these users?

This will help me determine if there are any issues with the request regardless of the 200 status response code.

In the meantime, let me share with you a script that I have tested which successfully creates a user with the Management API:

```auto
const axios = require('axios');
let data = JSON.stringify({
  "email": "testuser@example.com",
  "password": "SECRET",
  "connection": "Username-Password-Authentication"
});

let config = {
  method: 'post'
  url: 'https://YOUR_AUTH0_DOMAIN/api/v2/users',
  headers: { 
    'Authorization': 'Bearer {{MANAGEMENT_API_TOKEN}}, 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 11, 2023, 12:01am UTC](https://community.auth0.com/t/user-creation-management-api-return-200-but-user-does-not-exist/112280/4 "2023-08-11T00:01:35Z")

</div>

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