pownraj-anubavam / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

OAuth2 Get DeveloperKey #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$client->setDeveloperKey('insert_your_developer_key');
$oauth2 = new apiOauth2Service($client);

if (isset($_GET['code'])) {
  $client->authenticate();
  $_SESSION['token'] = $client->getAccessToken();
}

What steps will reproduce the problem?
1. how get the DeveloperKey ?? 
2. Have the get DeveloperKey sample code?
3. use php Oauth 2.0!

Original issue reported on code.google.com by yehc...@gmail.com on 4 May 2012 at 3:23

GoogleCodeExporter commented 9 years ago
To answer #1: The oauth client id, and developer key can be registered through 
the Google API Console.
https://code.google.com/apis/console/

To answer #2: There is a sample application that demonstrates how to use OAuth 
2.0 over here:
http://code.google.com/p/google-api-php-client/source/browse/trunk/examples/user
info/index.php

There is some additional documentation available here:
http://code.google.com/p/google-api-php-client/wiki/OAuth2

Original comment by chirags@google.com on 9 May 2012 at 1:07