# API to create user with connection of another App

**URL:** <https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197>\
**Category:** Get Help\
**Tags:** manage-users\
**Created:** [April 22, 2022, 7:10am UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197 "2022-04-22T07:10:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpfefferkorn](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bpfefferkorn/32/36806_2.png) [@bpfefferkorn](https://community.auth0.com/u/bpfefferkorn)\
**Post date:** [April 22, 2022, 7:10am UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/1 "2022-04-22T07:10:10Z")

</div>

Hi,

We’ve created a web application and add it in auth0 as a regular web application.  
Users can connect with a “Username-Password-Authentication”.

Next we’ve created an API “proxy” to manage auth0 users. We’ve added this API in auth0 as a “machine-to-machine” API. Of course this API is not using connection “Username-Password-Authentication”.

Now when we try to add a new user that will access to our web app we get an error “connection is disabled (client\_id: XXXXXX - connection: Username-Password-Authentication)”.

If we enable the connection “Username-Password-Authentication” it works but we don’t want to give access to users to this API.  
What is the problem? What should we do?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 22, 2022, 10:08pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/2 "2022-04-22T22:08:12Z")

</div>

Hi @bpfefferkorn,

Welcome to the Auth0 Community!

Can you share with us how you are trying to add new users?

---

<div class="post-metadata">

**Author:** ![bpfefferkorn](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bpfefferkorn/32/36806_2.png) [@bpfefferkorn](https://community.auth0.com/u/bpfefferkorn)\
**Post date:** [April 23, 2022, 6:06am UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/3 "2022-04-23T06:06:16Z")

</div>

Hi,

We’re using a POST request on this API endpoint : https://[tenant-url]/api/v2/users

Body is the following :

```auto
{
  "email": "user@email.com",
  "user_metadata": {},
  "blocked": false,
  "email_verified": false,
  "app_metadata": {},
  "given_name": "John",
  "family_name": "Doe",
  "name": "John Doe",
  "nickname": "Johnny",
  "connection": "Username-Password-Authentication",
  "password": "my_password",
  "verify_email": false
}

```

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 25, 2022, 3:36pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/4 "2022-04-25T15:36:28Z")

</div>

This error is expected if you are creating users this way.

The [/dbconnection/signup](https://auth0.com/docs/api/authentication#authenticate-user) endpoint should allow you to do what you are trying to do here.

---

<div class="post-metadata">

**Author:** ![bpfefferkorn](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bpfefferkorn/32/36806_2.png) [@bpfefferkorn](https://community.auth0.com/u/bpfefferkorn)\
**Post date:** [May 2, 2022, 3:21pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/5 "2022-05-02T15:21:24Z")

</div>

Thanks for your answer.  
But the problem we now encouter is a “public signup is disabled” error.  
This is indeed what we want: users should not be given the option to signup themself.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 4, 2022, 5:05pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/7 "2022-05-04T17:05:41Z")

</div>

Are you using the same application credentials (client\_id, client secret) for your web app and M2M app/API?

---

<div class="post-metadata">

**Author:** ![bpfefferkorn](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bpfefferkorn/32/36806_2.png) [@bpfefferkorn](https://community.auth0.com/u/bpfefferkorn)\
**Post date:** [May 6, 2022, 7:15am UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/8 "2022-05-06T07:15:22Z")

</div>

No, these are independent applications with each their own credentials

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 6, 2022, 3:50pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/9 "2022-05-06T15:50:43Z")

</div>

And you are unable to use your M2M app to create new users?

I think I’m confused by this statement:

> [@bpfefferkorn](#):
>
> If we enable the connection “Username-Password-Authentication” it works but we don’t want to give access to users to this API.

How would users access this API? How do your users have access to this M2M app?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 28, 2022, 10:32pm UTC](https://community.auth0.com/t/api-to-create-user-with-connection-of-another-app/82197/10 "2022-06-28T22:32:18Z")

</div>


