Re: Adwords + OAuth empty access code

2018-04-03 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
Hi, 

You are right, it is not possible to generate the access token using the 
PHP client library. The library takes care of creating the access token and 
using that in the API call for each request. If you are specifically 
looking to generate the access token, you could generate that using the 
curl request given below: 

curl https://www.googleapis.com/oauth2/v4/token  \
-d refresh_token=you_refresh_token  \
-d client_id=your-client-id  \
-d client_secret=your-client-secret  \
-d grant_type=refresh_token

Please check this forum thread 

 for 
more details about the same discussion. 

Thanks,
Sreelakshmi, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/38cf67fb-414c-40c8-8897-3792849eff54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Adwords + OAuth empty access code

2018-04-03 Thread TheGMUniverse
Hi, i am trying to log people in through Oauth to manage their Campaigns, 
but whenever i make a call for a session, i am not getting any access code 
returned:



This is how i use it:


public function setOAuth($token){
echo $token. "";
echo $this->client_id. "";
echo $this->client_secret. "";
echo $this->dev_token. "";

$oAuth2Credential = (new OAuth2TokenBuilder())
->withClientId($this->client_id)
->withClientSecret($this->client_secret)
->withRefreshToken($token)
->build();
$soapSettings = (new 
SoapSettingsBuilder())->disableSslVerify()->build();
echo "OAUTH";
echo "";
print_r($oAuth2Credential);
echo "";
echo "SOAPSETTINGS";
echo "";
print_r($soapSettings);
echo "";
$session = (new AdWordsSessionBuilder())
->withDeveloperToken($this->dev_token)
//->withClientCustomerId('361-779-4901')
->withUserAgent('Hello')
->withSoapSettings($soapSettings)
->withOAuth2Credential($oAuth2Credential)
->build();

return $session;
}

Does anyone know how i can fix this?

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/7ec93f22-7715-47b3-88e2-258167b8be0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.