Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3720

Google OAuth 2 authorization - Error: redirect_uri_mismatch - Youtube API v3

$
0
0
$data = array('code' => $code,'client_id' => '...', 'client_secret' => '...','redirect_uri' => 'http://localhost/youtube/cookie_token.php','grant_type' => 'authorization_code');$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://accounts.google.com/o/oauth2/token');curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, $data);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);$return = curl_exec($ch);curl_close($ch);echo $return;

As you can see in this screenshot from Google Console, the URL has been registered in the application.


Viewing all articles
Browse latest Browse all 3720

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>