Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
132
rated 0 times [  135] [ 3]  / answers: 1 / hits: 10825  / 10 Years ago, fri, may 30, 2014, 12:00:00

Looking for some insight into how to get video information using youtube's v3 api.



When passing the url, the json response I get is:



{error:{errors:[{domain:global,reason:sslRequired,message:SSL is required to perform this operation.}],code:403,message:SSL is required to perform this operation.}}


All I'm trying to do is get basic information (title, description, etc) so I used snippet for the part.



Here's a sample url i'm using:



http://www.googleapis.com/youtube/v3/videos?id=Ho4XgLj40Ss&part=snippet


I have tried creating an API Key and adding &key={my_api_key} to the end of that url.



If the environment matters, I'm using a jquery getJSON request in a custom Wordpress theme.



I should mention that in the try it now section in the documentation, it returns a nice json object - with the OAuth off.


More From » wordpress

 Answers
5

I had the same problem for another API.
As SLaks pointed out in the comments, just use https:// instead of http://



In your case, try :



https://www.googleapis.com/youtube/v3/videos?id=Ho4XgLj40Ss&part=snippet

[#44925] Thursday, May 29, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tayaw

Total Points: 749
Total Questions: 88
Total Answers: 86

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
tayaw questions
;