Start a new topic

can't auth to crawlera

Hi there.

I'm using the example for php.

$url = 'https://httpbin.scrapinghub.com/get';
$proxy = 'proxy.crawlera.com:8011';
$proxy_auth = '<API KEY>:';

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy_auth);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);
curl_setopt($ch, CURLOPT_CAINFO, '/path/to/zyte-proxy-ca.crt'); //required for HTTPS
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); //required for HTTPS

I downloaded the file zyte-proxy-ca.crt

Checked api-key in my profile.

But when I run the script I receive 407 error.


HTTP/1.1 200 OK


HTTP/1.1 407 Proxy Authentication Required

X-Crawlera-Error: bad_proxy_auth

X-Crawlera-Version: 1.47.5

Proxy-Authenticate: Basic realm="Crawlera"

Content-Length: 0

Date: Tue, 06 Apr 2021 13:46:29 GMT

Proxy-Connection: close

Connection: close


What do I wrong?


Login to post a comment