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

DDSameera's avatar

cURL error 6: Could not resolve host: api.zoom.us

I'm trying to access ZOOM API via on laravel ajax methodology. it works some times, other times ,it gives this error. please help me to resolve this incident.

{,…}
exception: "Illuminate\Http\Client\ConnectionException"
file: "C:\wamp64\www\lms\vendor\laravel\framework\src\Illuminate\Http\Client\PendingRequest.php"
line: 587
message: "cURL error 6: Could not resolve host: api.zoom.us (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.zoom.us/v2//meetings/93505768983/registrants?status=pending"
trace: [,…]
0 likes
2 replies
tisuchi's avatar

@ddsameera have you tried to check via condition?

Maybe something like this. It will show an error / a custom error page.

$result = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}


return json_decode($result, true);
1 like
siangboon's avatar
Level 54

if just a local test/development, the quick fix may add the record in the hosts file

1 like

Please or to participate in this conversation.