Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

acoustic85's avatar

cURL error 3

Hi Guys I am trying to make GET request but for some reason I am getting this annoying cURL error cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Any idea what I am doing wrong ?

This is my code :

public function fetch() {


        $response = Http::get(' https://api.getAddress.io/find/tw134gt ', [
            'apiKey' => 'my api key',
            'limit' => 10,
        ]);

        $address = json_decode($response->body());

        return $address;
    }


0 likes
5 replies
drewdan's avatar

Not sure if this is it, but you have whitespace before the https:// - is that just a formatting error due to the forum?

drewdan's avatar

I use getAddress too, and aside from the whitespace at the start of the url, it looks ok to me!

acoustic85's avatar

yes you are right but now even though I include the api key again its giving me unauthorized...

drewdan's avatar
drewdan
Best Answer
Level 15

In the dashboard, there are two keys, the admin key and the API key, make sure you are using the API key, and if it does not work, generate a new one and try that.

As a side note, I didn't realize limit was an acceptable query parameter, but I might be wrong. It's just not listed on the documentation.

TuqueroIvantckJernalyn's avatar

I followed tutorial for a github sign in with laravel 8 and when i press on a button for sign in this error pops up always. I looked up on stackoverflow i saw guys commenting to include cacert.pem file in php directory and then add the path to curl variable in php.ini, i did all of that but the error still remains. Anybody knows how can i fix this?

Please or to participate in this conversation.