Trying to use the YouTube API v3 to get some video(s) information, using Guzzle in Symfony2 using Service Descriptors.
When I run the script, I get this:
1) Save the contents of this ca bundle file to your system, eg to: C:/ca-bundle.crt
2) Update php.ini property openssl.cafile like so: openssl.cafile="C:/ca-bundle.crt"
3) restart server/ done / should now work
more info here: http://guzzle.readthedocs.io/en/stable/request-options.html#verify
It can be that it is looking for the SSL certificate of your site.
If this is the case, try to disable the SSL certification:
$client->setDefaultOption('verify', false);
The best option is
https://github.com/composer/ca-bundle
$client = new \GuzzleHttp\Client([
\GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()
]);
I use guzzle/guzzle 3.* and this code works for me :
$client = new Client(env('API_HOST'));
$client->setSslVerification(false);
If you are using Facades Http then you can pass verify false in withOptions method :
Http::withOptions(['verify' => false,])->withHeaders($headers)->get($endpoint);