Re: Can't authorise to google when use googleads-php-lib

2017-01-03 Thread 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
Hi,

Looks like there is some problem in setting OAuth credentials in your 
client library. Could you please confirm if the client_id and client_secret 
values are correctly copied from the Google API console project to your 
auth.ini file? Also, please note that examples in our PHP client library 
are designed to be run on the command line and may cause issues if run via 
a web browser.  

Regards,
Vishal, 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/bb56ecb7-d8d7-4e51-b0b9-3b563f7efd7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can't authorise to google when use googleads-php-lib

2017-01-03 Thread ВІталій Мозок


I want to upload sitelinks using googleads-php-lib 


I tried using the following example: 
https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201609/Extensions/AddSitelinks.php
.

I've created an application in the Google API Console and I've also created 
a manager account in Adwords and got the developer token. I also obtained 
the refresh token using the code found in GetRefreshToken.php.

But when executing the scripts I get the following 400 response:

Exeption 400 Bad Request` response: { "error": "invalid_client",
"error_description": "Bad Request" } after line $customers =
$customerService->getCustomers();

I have no idea what went wrong and what I'm missing and should do. What 
causes this 400 response? And how can I fix it?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/6d3fa5f7-f70b-46aa-a8a7-89de0f79fc19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.