Connection not found when using Auth0 signup API

I’m trying to create a user in Auth0 with sign up API.
Take a look at the code:

import requests
import random
import string
from requests.packages.urllib3.exceptions import InsecureRequestWarning
password = ''.join(random.choices(string.ascii_uppercase + string.digits, k=15))
url = ""
user_data = {
    'client_id': 'vxAhL2XZkmJEp4EXykrEhZiJAQ7p0KKp',
    'full_name': 'Aaron Rodgers',
    'first_name': 'Aaron',
    'last_name': 'Rodgers',
    'email': '',
    'password': password,
    'cell': 'greenbay',
    'connection': 'con_uIZUSVyNVRyaQWvT',
headers = {'Content-Type': 'application/json'}
r =, json=user_data, verify=False)
if r.status_code == 404:
    print("Connection error")

I put the identifier under db as connection value.

I’m using the default application credentials. Also tried with creat other db connections and I still get {"error":"connection not found"}.

Hi @mko22 ,

Welcome to the Auth0 Community!

For the signup endpoint, the connection is the name of the database connection to store your user’s data, not the connection id. For example, if you use the Auth0 database connection, set

'connection': 'Username-Password-Authentication'

Hope this helps!

Yep that helped, I thought I was supposed to use the db id for ‘connection’ field.

1 Like

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