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 = "https://my-domain-name.eu.auth0.com/dbconnections/signup"
user_data = {
'client_id': 'vxAhL2XZkmJEp4EXykrEhZiJAQ7p0KKp',
'full_name': 'Aaron Rodgers',
'first_name': 'Aaron',
'last_name': 'Rodgers',
'email': 'packers@hmail.com',
'password': password,
'cell': 'greenbay',
'connection': 'con_uIZUSVyNVRyaQWvT',
}
headers = {'Content-Type': 'application/json'}
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
r = requests.post(url, json=user_data, verify=False)
print(r.text)
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"}
.