0

I'm using the Youtube Data Api v3 and I want to use the json form to get the Client ID from OAuth and the client secret, also the app name too, but I don't know how to call the JSON object.

My code look like this:

$application_name = 'StackOverflow'; 
$client_secret = 'xxxxxx';
$client_id = 'xxxxxx.apps.googleusercontent.com';
$scope = array('https://www.googleapis.com/auth/youtube.upload', 'https://www.googleapis.com/auth/youtube', 'https://www.googleapis.com/auth/youtubepartner');

$videoPath = $_SERVER["DOCUMENT_ROOT"] . "/apiyoutube/google-api/xxx.avi";

Instead of this, I want to get the all of above Id's from the JSON to use the api in a safe way.

DaImTo
  • 88,623
  • 26
  • 153
  • 389
7sega7
  • 101
  • 4
  • 1
    You might want to consider using the php client library https://github.com/google/google-api-php-client – DaImTo Apr 24 '17 at 08:31
  • 1
    Yep, done, I just need to put $client->setAuthConfigFile('client_secret.json'); and work. Thank You! – 7sega7 Apr 24 '17 at 10:34

0 Answers0