Hi below my code , i am using it to get oauth_refresh_token,
oauth_register_email and Client Id when user click on Link to Ad-wards
account link from my web tool. So that i can fetch keyword from user's
Adwards account offline.
this code was working perfect but with v201603 it is not giving output no
any error.
try {
$oauth2_info = array('client_id' => Configure::read(
'AW_CLIENT_ID'),
'client_secret' => Configure::read('AW_CLIENT_SECRET'),
'refresh_token' => $refresh_token
);
$user = new AdWordsUser();
$user->SetOAuth2Info($oauth2_info);
$user->LogAll();
$customerService = $user->GetService('CustomerService',
ADWORDS_VERSION); //Here it is not working means. Not returning anything ,
no error
// Make the get request.
$result = $customerService->get();
if (!empty($result)) {
$i = 0;
$isMCC = $result->canManageClients;
if (!$isMCC) {
$clients['client_id'] = $result->customerId;
$clients['oauth_refresh_token'] = $refresh_token;
} else {
return $result->customerId;
}
}
Thanks,
Naresh Kumar
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/e244bbe1-6d21-4d41-ab18-7e6eb8c19ad0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.