RE: Error while running GetCampaigns.php file

2019-02-19 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi Virender,

I have masked the sensitive information from your post. Moving further,
regarding your issue, could you check the emailid for which the OAuth was
created is the same emailid that you are making API calls with and also has
access to the Google Ads account? If not, please reply back with your
Client customer id and emaild, so that I can check further. You may *reply
privately to author*.

Regards,
Dhanya, AdWords API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/00d12jhi9800ooapco0015aomoz6omjie9p6ko30c1g68p36c9k%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while running GetCampaigns.php file

2019-02-19 Thread virender . sbinovations
Hi Dhanya,

I am also getting the same error 401 Unauthorized response. I have verified 
credentials using CURL and it is working fine. I am getting response "{ 
"access_token": 
"ya29.Gly0BmIVqCgwub4x8pFcHTIlb1Wqair7788SliGRYvLWZVv7E5Zab3TRm8gXSab4bM8h5cvp-yTj8aBOKieh-lbolzo6bPeDT_nJ3nPf08cB7t1h98gYF328sph5QA",
 
"expires_in": 3600, "scope": "https://www.googleapis.com/auth/adwords";, 
"token_type": "Bearer" }".

Please help me!

Regards,
Virender

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/57c61d38-3761-4fcd-97dd-1bdf506a1679%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while running GetCampaigns.php file

2018-06-06 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Szusi,

Could you confirm that the clientId field in your adsapi_php.ini 

 is 
the same as the one in your project within Google API Console Credentials 
page ? Please refer 
this 

 guide 
for better clarity and let me know if you have further questions.

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/fd3bfe24-2016-4f44-b025-fd3aedbfcf5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while running GetCampaigns.php file

2018-06-06 Thread szusi
Thanks for the suggestion, unfortunately, after running the curl request I 
receive:   

 "error": "invalid_client",

 "error_description": "The OAuth client was not found."
Which is odd because I was able to use GenerateRefreshToken.php using the 
same credentials. What is the next step?
On Wednesday, June 6, 2018 at 8:43:16 AM UTC-6, Dhanya Sundararaju (AdWords 
API Team) wrote:
>
> Hi Szusi,
>
> To verify that your credentials are correct, you can try the CURL request 
> provided below and see if you are able to generate the access tokens. If 
> the credentials are correct, you should get an access token for the below 
> request.
>
> curl https://www.googleapis.com/oauth2/v4/token \
> -d refresh_token=your-refresh_token \
> -d client_id=your-client-id \
> -d client_secret=your-client-secret \
> -d grant_type=refresh_token
>
> If your credentials are incorrect and still facing issues then please 
> follow below steps:
>
>1. Open a new incognito window. 
>2. Generate the client id and secret 
>
> 
>  using 
>a valid AdWords user login. 
>3. Generate the refresh token 
>
> 
>  using 
>the GetRefreshToken.php 
>
> 
>. 
>4. Use those credentials to run GetCampaigns.php 
>
> 
>
> Let me know if you still get errors.
>
> Regards,
> Dhanya, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/6074164b-4e05-4d0e-959d-26c09a448430%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while running GetCampaigns.php file

2018-06-06 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Szusi,

To verify that your credentials are correct, you can try the CURL request 
provided below and see if you are able to generate the access tokens. If 
the credentials are correct, you should get an access token for the below 
request.

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

If your credentials are incorrect and still facing issues then please 
follow below steps:

   1. Open a new incognito window. 
   2. Generate the client id and secret 
   

 using 
   a valid AdWords user login. 
   3. Generate the refresh token 
   

 using 
   the GetRefreshToken.php 
   

   . 
   4. Use those credentials to run GetCampaigns.php 
   


Let me know if you still get errors.

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/4cfe8b0c-020d-4f73-82a1-9bfb72be080a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error while running GetCampaigns.php file

2018-06-06 Thread szusi


Hi there, I've been following along with the Adwords API Dev series on 
youtube to help me setup my API, however, when running the getCampaigns.php 
file through terminal, I run into the following error:

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with 
message 'Client error: POST https://www.googleapis.com/oauth2/v4/token resulted 
in a 401 Unauthorized response:
{
"error": "unauthorized_client",
"error_description": "Unauthorized"
}

' in 
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Middleware.php(66):
 
GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), 
Object(GuzzleHttp\Psr7\Response))
#1  
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/Promise.php(203):
 
GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))
#2  
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/Promise.php(156):
 
GuzzleHttp\Promise\Promise::callHandler(1, 
Object(GuzzleHttp\Psr7\Response), Array)
#3  
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/TaskQueue.php(47):
 
GuzzleHttp\Promise\Promise::Guzzle in 
/Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
 
on line 113


Not sure what the issue is, please let me know what the best way to go 
about fixing this is.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/c0a0edb5-2826-43f3-b117-f194cec0bb89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.