Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guzzle Curl Error 60 SSL unable to get local issuer

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:

[curl] 60: SSL certificate problem: unable to get local issuer certificate [url] https://www.googleapis.com/youtube/v3/videos?id=2xbVbCoHBgA&part=snippet&key={MY_KEY}

500 Internal Server Error - CurlException

My descriptor looks like this:

{     "name": "YouTube",     "baseUrl": "https://www.googleapis.com",     "apiVersion": "v3",     "description": "YouTube GData Graph API",     "operations": {         "GetVideos": {             "httpMethod": "GET",             "uri": "/youtube/v3/videos",             "parameters": {                 "id": {                     "type":"string",                     "location":"query",                     "required": true                 },                 "part": {                     "location": "query",                     "default": "snippet"                 },                 "key": {                     "location": "query",                     "default": "{MY KEY}",                     "static": true                 },                 "maxResults": {                     "location": "query",                     "default": 50                 }             }         }     } } 

This is running on a local Ubuntu 14.04 development environment with a very basic LAMP stack going on.

Any ideas as to what might be causing this?

like image 494
RedactedProfile Avatar asked Jul 24 '14 01:07

RedactedProfile


People also ask

What is a curl Error 60?

Error “curl: (60) SSL certificate problem: unable to get local issuer certificate” can be seen when the SSL certificate on the server is not verified or properly configured.


1 Answers

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); 
like image 117
reshetech Avatar answered Oct 04 '22 15:10

reshetech