Google API - request for token from Oauth2 returns null token
<p>For credentials, I have created an developer account on <a href="https://console.developers.google.com" rel="nofollow">https://console.developers.google.com</a>, I have created a project and then i have created credentials from API Manager. I use "google/apiclient": "1.1.*" package. I think it is a problem with credentials.</p>

<pre><code>    $OAUTH2_CLIENT_ID = 'XXXXX-rvm1l9b1nvht9je1ic0bbe05ab5gvhbg.apps.googleusercontent.com';
    $OAUTH2_CLIENT_SECRET = 'XXXXXXP90L_DLD3Nrc_rT4zGD';

    $client = new Google_Client();
    $client-&gt;setClientId($OAUTH2_CLIENT_ID);
    $client-&gt;setClientSecret($OAUTH2_CLIENT_SECRET);
    $client-&gt;setScopes('https://www.googleapis.com/auth/youtube');
    $redirect = url('/');
    $client-&gt;setRedirectUri($redirect);


    $token = $client-&gt;getAccessToken();
    dd($token);
</code></pre>