Auth0 Home Blog Docs

What dose it mean "connection is required"? I wanna use custom login form


I’m a Japanese, so my English is maybe so bad.Sorry.

I want to use custom login or sign up form only MAILADDRESS and PASSWORD.
I found this page : .

So I created a form to enter my email address and password and sent information from PHP to Auth 0.

$curl = curl_init();

            $data = [
                'client_id' => 'xxxxxxxxxxxxxxx',
                'email' => 'my email address',
                'password' => 'PassWord1234'

            $json = json_encode($data);

            curl_setopt_array($curl, array(
                CURLOPT_URL => "https://xxxxxxxxxxxxxxxx/dbconnections/signup",
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_ENCODING => "",
                CURLOPT_MAXREDIRS => 10,
                CURLOPT_TIMEOUT => 30,
                CURLOPT_CUSTOMREQUEST => "POST",
                CURLOPT_POSTFIELDS => $json,
                CURLOPT_HTTPHEADER => array(
                    "content-type: application/json"

            $response = curl_exec($curl);
            $err = curl_error($curl);


            if ($err) {
                echo "cURL Error #:" . $err;
            } else {
                echo $response;

However, Auth0 returned the message {"error":"connection is required"}.

I did not know exactly what was wrong, I also tried CURL.

  curl --request POST \
--url 'https://xxxxx/dbconnections/signup' \
--header 'content-type: application/json' \
--data '{"client_id": "xxxxxxxxxxxxx","email": "my email address","password": "PasssWord1234","user_metadata": {"name": "john","color": "red"}}'

Auth0 returned the same message connection is required.

What should I do?
If someone knows how to solve it, I’d appreciate it if you could teach me.

Thank you.

Snake feet.

I use CakePHP3.


do you have two or more database connections available?


Thank you for your reply!

do you have two or more database connections available?

I have only one tenant and only one DB.


Here’s the correct link

1 Like

As @arts link suggests you need to put the name of your database connection as part of this. I believe the connection parameter is required even if you have a single connection.


We just updated our docs with the missing required parameter:


@arts @luis.rudge @sgmeyer
Everyone, thank you for your reply!
I have solved this problem.

I included connection => DATABASE NAME, It could connect!
Thank you!

How to login with API (PHP)
closed #9