Hello everyone,
I'm successfully generating *$authorizationUrl* using the code below.
However on using that URL I'm receiving the error:
*Missing required parameter: scope.*
*OAUTH2_SCOPE* is being declared as a constant in the* AdWordsUser* class
so I'm confused as to why it's not being carried across.
I'm working with the following:
Library: adwords_api_php_4.5.1
Version: v201306
As Always, any ideas would be appreciated.
function GetOAuth2Credential($user, $callbackUrl) {
$redirectUri = $callbackUrl;
$offline = TRUE;
// Get the authorization URL for the OAuth2 token.
// Pass in a redirect URL back to the application,
// Passing true for the second parameter ($offline) will provide us
a refresh
// token which can used be refresh the access token when it expires.
$OAuth2Handler = $user->GetOAuth2Handler();
$authorizationUrl = $OAuth2Handler->GetAuthorizationUrl(
$user->GetOAuth2Info(), $redirectUri, $offline);
return $authorizationUrl;
}
// Create a new user and set the oAuth settings
$user = new AdWordsUser();
$user->LogAll();
$user->SetOAuth2Info(array(
"client_id" => $clientId,
"client_secret" => $clientSecret
));
// Generate an authorization URL given the callback URL
$authUrl = GetOAuth2Credential($user, $callbackUrl);
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.