generating refresh token

2024-04-12 Thread ofir sabag

I'm attempting to connect to the Google Ads API using a C# library, but I'm 
struggling to understand how to generate an OAuth2 refresh token. I've read 
the documentation, which suggests using oauth2l, but I haven't been able to 
install it on my computer. Is there an alternative method to generate the 
refresh token?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/47cc4280-aaa5-4902-b30c-71c5d2a9d499n%40googlegroups.com.


RE: Error while generating refresh token - in Production mode

2022-12-22 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Vamshi,

Thank you for reaching out to the Google Ads API support team.

Please note that as per this guide, a Google Cloud Platform project with an 
OAuth consent screen configured for an external user type and a publishing 
status of "Testing" is issued a refresh token expiring in 7 days. As per seeing 
the screenshot you have provided, it appears that you have encountered an 
Unverified app warning. That said, I would suggest the below guides which are 
mainly about the verification process:

How to verify: OAuth API verification FAQs - Google Cloud Platform Console Help
General information: Unverified apps - Google Cloud Platform Console Help


Regards,

Carmela
Google Ads API Team
ref:_00D1U1174p._5004Q2hMygW:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/guMCZ0RNBRN700x6THSQceS0KX51IRBFTz4w%40sfdc.net.


Error while generating refresh token - in Production mode

2022-12-22 Thread Vamshi Merugu
Hi Team ,

We are planning to send conversion data to post to google by using *enhanced 
conversions 
*
.

For this purpose, for authentication, we are using Oath2 flow for desktop/ 
web application to generate refresh token using python client libraries & 
We want to use the same refresh token for our daily process to call google 
client libraries.  


   - As our app status un testing mode, the refresh token is expiring after 
   1 week. T fix the *refresh token expiration* issue after 1 week, google 
   team has earlier suggested to publish the app instead of working in testing 
   mode.
  - But, after publishing the ap, refresh token generation is not 
  working. (please find the attached screenshot for the issue)  
   - If we switch back to testing mode again, we can successfully generate 
   the refresh token. 
  - We are having issue for production implementation. We dont want the 
  refresh token to expire once we go-live. 
   - Based on previous suggesions, we tried to see if we need to verify 
   app. But, in GCP its clearly showing that "verification not required"  

Appreciate your help. 

Thanks,
Vamshi




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7ad2961f-019a-47bd-be68-7ee70e8072bcn%40googlegroups.com.


Re: Generating refresh token

2022-05-11 Thread Katherine Martin
Hi Carmela,

Thank you for that. I understand it references refresh tokens, however I am 
struggling to follow it and need additional help. Is there someone from 
support who I can have a call with? On the documentation it says: ' The 
authorization sequence begins when your application redirects a browser to 
a Google URL; the URL includes query parameters that indicate the type of 
access being requested.' I don't understand what the URL is, can I have 
some example code that I can run?

Thanks,
Katherine

On Wednesday, 11 May 2022 at 06:24:07 UTC+1 adsapi wrote:

> Hi Katherine, 
>
> Thank you for getting back to us.
>
> Moving forward, kindly note that the document that we provided is indeed 
> the guide on generating refresh tokens. That said, could you confirm what 
> is your concern or what is not clear in the documentation we gave to you so 
> we can further assist you?
>
> Regards,
> [image: Google Logo] 
> Carmela 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2ar2kA:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/771a249a-47b3-4038-b275-0888681b7f16n%40googlegroups.com.


Re: Generating refresh token

2022-05-10 Thread Katherine Martin
Hi Adsapi,

It seems that you have sent me the same documentation again, is there 
anywhere I can go for actual steps on how to do it / anyone I can talk to 
for help?

Best,
Kitty

On Tuesday, 10 May 2022 at 15:39:28 UTC+1 adsapi wrote:

> Hi Katherine,
>
> Thanks for getting back to us.
>
> For the refresh token, you may refer here to this *guide* 
>  
> for the steps on how you can generate the refresh token. 
>
> Let me know if this helps.
>
> Regards,
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2ar2kA:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/628701d3-c1c9-45f4-ab21-b89abda3a790n%40googlegroups.com.


Re: Generating refresh token

2022-05-10 Thread Katherine Martin
Hi Adsapi,

Thanks for the quick reply.

I have read the documentation however I don't think it specifically 
includes information on the actual process of generating the refresh token. 
Could I please have assistance in doing it.

Thanks,
Katherine

On Tuesday, 10 May 2022 at 07:10:24 UTC+1 adsapi wrote:
Hi Katherine,

Thank you for reaching out to the Google Ads API team.

Moving forward, it appears that this is specifically about generating the 
refresh token. That said, the documentation 

 you 
have found is the right guide on how to obtain a refresh token. As you can 
see on the said documentation, if your application needs access to a Google 
API beyond the lifetime of a single access token, it can obtain a refresh 
token. Also, you may refer to this *guide* 
 
for 
more details on how to generate refresh tokens.

Regards,




Carmela
Google Ads API Team
 

ref:_00D1U1174p._5004Q2ar2kA:ref

On Tuesday, 10 May 2022 at 07:10:24 UTC+1 adsapi wrote:

> Hi Katherine,
>
> Thank you for reaching out to the Google Ads API team.
>
> Moving forward, it appears that this is specifically about generating the 
> refresh token. That said, the documentation 
> 
>  you 
> have found is the right guide on how to obtain a refresh token. As you can 
> see on the said documentation, if your application needs access to a Google 
> API beyond the lifetime of a single access token, it can obtain a refresh 
> token. Also, you may refer to this *guide* 
>  
> for 
> more details on how to generate refresh tokens.
>
> Regards,
> [image: Google Logo] 
> Carmela 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2ar2kA:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5b7c1faa-7ba8-4e63-b2eb-c9937b846cd2n%40googlegroups.com.


Generating refresh token

2022-05-09 Thread Katherine Martin
Hi all,

I am attempting to connect to the google ads api (using a javascript 
library) - however I don't understand how to generate the refresh token. 
This is the only documentation I can find however I still don't understand 
how to do it after reading it.

https://developers.google.com/identity/protocols/oauth2#5.-refresh-the-access-token,-if-necessary.

Thanks in advance.
Kitty

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5d9b4375-3cf9-4884-b620-f8ccd782bda1n%40googlegroups.com.


Generating refresh token

2022-05-09 Thread Katherine Martin
Hi all,

I am attempting to connect to the google ads api (using a javascript 
library) - however I don't understand how to generate the refresh token. 
This is the only documentation I can find however I still don't understand 
how to do it after reading it.

Thanks in advance.
Kitty

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d5de7e6c-c905-49e7-a4c9-2d1dee3193f5n%40googlegroups.com.


RE: PHP - Getting redirect_uri_mismatch error while generating refresh token.

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


Hello Pavan,

The redirect_uri_mismatch error usually occurs when the wrong type of
credentials used in the program and the redirect_uri is not matching with
the one specified in the API console for web application type. You could
refer this guide
  
to

create the client ID and client Secret for Web flow and update the redirect
URI. Please give it a try and let me know if you are still facing the issue.

Our client library codes are meant to run from command line but not as web
pages. Since, PHP Codeigniter is a third party application you have to find
a way to call the PHP programs from that software and use the out come
results.

Regards,
Sai Teja, 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/ijlio2v6ao010up7g400192bd0x74mjed1n60o30c1g68qj8cho%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid grant when generating refresh token

2015-03-31 Thread Mark
I have no affiliation with google. Just a fellow user like you. In my 
experience there are 2 cases where the refresh doesn't work:

1. When you exchange their code with non-empty scopes as a parameter. Make 
sure to leave this blank (not sure which client library you're using) and 
only include non-empty scopes when you create the initial redirect url.
2. When the redirect url parm of the exchange code request is not the same 
as the redirect url you provided the user (must be identical)

Also, make sure to start over FRESH, ie log in and 
visit https://security.google.com/settings/security/permissions and REVOKE 
your application, then repeat the process.

I also can't find this in the documentation or anywhere else in the forum; 
I just had to figure it out painfully.

On Friday, March 27, 2015 at 11:51:13 AM UTC-7, Sean Gottschalk wrote:

 Hello,

 I'm trying to create a refresh token for a client using my adwords 
 developer credentials but when I enter the generated code I get a 400 
 invalid grant error from the adwords API.

 I logged into my developer console on my MCC account and verified that I 
 have the following OAuth credentials:

 Client ID
 379545466128.apps.googleusercontent.com
 Client secret
 secret
 Redirect URIs

 urn:ietf:wg:oauth:2.0:oob
 http://localhost 

 I am using this example to generate the token, and have successfully 
 generated tokens for other client accounts in the past:

 https://github.com/googleads/googleads-java-lib/blob/master/examples/dfp_axis/src/main/java/dfp/axis/auth/GetRefreshToken.java

 This is the url that I have the clients visit to generate the token:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=379545466128.apps.googleusercontent.comredirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=https://adwords.google.com/api/adwords

 I'm not sure where to go from here, does anyone have any debugging tips?



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9f4e7803-413d-4a7b-8503-c4c9e5f00ecc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid grant when generating refresh token

2015-03-30 Thread Josh Radcliff (AdWords API Team)
Hi,

Have you tried this multiple times? I ask because one possibility is that 
when you copied the authorization code from the browser, it's possible that 
you didn't copy the complete code.

Another suggestion would be to try getting another refresh token for a 
different account to see if it works for that account.

Thanks,
Josh, AdWords API Team

On Friday, March 27, 2015 at 2:51:13 PM UTC-4, Sean Gottschalk wrote:

 Hello,

 I'm trying to create a refresh token for a client using my adwords 
 developer credentials but when I enter the generated code I get a 400 
 invalid grant error from the adwords API.

 I logged into my developer console on my MCC account and verified that I 
 have the following OAuth credentials:

 Client ID
 379545466128.apps.googleusercontent.com
 Client secret
 secret
 Redirect URIs

 urn:ietf:wg:oauth:2.0:oob
 http://localhost 

 I am using this example to generate the token, and have successfully 
 generated tokens for other client accounts in the past:

 https://github.com/googleads/googleads-java-lib/blob/master/examples/dfp_axis/src/main/java/dfp/axis/auth/GetRefreshToken.java

 This is the url that I have the clients visit to generate the token:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=379545466128.apps.googleusercontent.comredirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=https://adwords.google.com/api/adwords

 I'm not sure where to go from here, does anyone have any debugging tips?



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b79931b2-428c-44f1-9294-d182dd1ad703%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid grant when generating refresh token

2015-03-30 Thread Sean Gottschalk
Hi Josh,

I've had the client re-generate the code 3 or 4 times and have received the 
same invalid grant response each time. 

The interesting thing is that I can generate the code using my personal 
google account (not related to any adwords accounts) against the client's 
adwords customer id and the OAuth service returns a refresh token. Could 
this be a sign that the client isn't giving me the full code, or could 
there be something wrong with their google account?

On Monday, March 30, 2015 at 8:15:52 AM UTC-7, Josh Radcliff (AdWords API 
Team) wrote:

 Hi,

 Have you tried this multiple times? I ask because one possibility is that 
 when you copied the authorization code from the browser, it's possible that 
 you didn't copy the complete code.

 Another suggestion would be to try getting another refresh token for a 
 different account to see if it works for that account.

 Thanks,
 Josh, AdWords API Team

 On Friday, March 27, 2015 at 2:51:13 PM UTC-4, Sean Gottschalk wrote:

 Hello,

 I'm trying to create a refresh token for a client using my adwords 
 developer credentials but when I enter the generated code I get a 400 
 invalid grant error from the adwords API.

 I logged into my developer console on my MCC account and verified that I 
 have the following OAuth credentials:

 Client ID
 379545466128.apps.googleusercontent.com
 Client secret
 secret
 Redirect URIs

 urn:ietf:wg:oauth:2.0:oob
 http://localhost 

 I am using this example to generate the token, and have successfully 
 generated tokens for other client accounts in the past:

 https://github.com/googleads/googleads-java-lib/blob/master/examples/dfp_axis/src/main/java/dfp/axis/auth/GetRefreshToken.java

 This is the url that I have the clients visit to generate the token:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=379545466128.apps.googleusercontent.comredirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=https://adwords.google.com/api/adwords

 I'm not sure where to go from here, does anyone have any debugging tips?



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e221c5a2-8d26-4188-b7bc-d8be6dd7872c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


invalid grant when generating refresh token

2015-03-27 Thread Sean Gottschalk
Hello,

I'm trying to create a refresh token for a client using my adwords 
developer credentials but when I enter the generated code I get a 400 
invalid grant error from the adwords API.

I logged into my developer console on my MCC account and verified that I 
have the following OAuth credentials:

Client ID
379545466128.apps.googleusercontent.com
Client secret
secret
Redirect URIs

urn:ietf:wg:oauth:2.0:oob
http://localhost 

I am using this example to generate the token, and have successfully 
generated tokens for other client accounts in the past:
https://github.com/googleads/googleads-java-lib/blob/master/examples/dfp_axis/src/main/java/dfp/axis/auth/GetRefreshToken.java

This is the url that I have the clients visit to generate the token:
https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=379545466128.apps.googleusercontent.comredirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=https://adwords.google.com/api/adwords

I'm not sure where to go from here, does anyone have any debugging tips?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/75da14e3-a103-4b56-ac54-c2644981f7ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Generating Refresh Token Automatically (Windows Service Application)

2013-11-12 Thread Anash P. Oommen (AdWords API Team)
Hi Bikram,

There are couple of ways by which you can do this depending on how your 
business works. IMO the 4th option is probably what you need.

1. If you are managing the entire client account on your own without 
involving the end user in any manner at any stage, then it might as well 
make sense to create a brand new AdWords account for them and manage their 
ads in that account. You could create it using ManagedCustomerService under 
your MCC account. That way, you would need only the credentials of your MCC 
account. You could generate a refresh token for your MCC account and put 
that in a configuration file.

2. See if it is a possibility to link the accounts under your MCC. If this 
can be done, then you only need to know your MCC account's credentials. The 
OAuth2 logic works the same way as (1).

3. See if you can invite a login from your organization to manage the 
client's account. This way, you will end up with multiple accounts, but you 
know the credentials of all those accounts. You could generate refresh 
tokens offline for each of these accounts, and store those in the database. 
For each hierarchy of accounts, you could use the corresponding refresh 
token from your data store.

4. Provide a login page for your client, where they can login and then 
authenticate your service to access their AdWords accounts on their behalf. 
That web page could implement OAuth2, and generate a refresh token that you 
store in your database, along with the clientCustomerId of that account. 
You could then use these tokens to make API calls.

In all the above cases, getting a refresh token is a one-time process and 
wouldn't need any more user interaction.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Friday, November 8, 2013 12:22:59 PM UTC-5, Bikram Bhuyan wrote:

 Hi Anash,

 Thanks for your reply. Actually it will be a brand new integration we are 
 doing with AdWords API. So I am looking for the best possible way to 
 implement. So your suggestion and any other tips will be highly helpful as 
 we are currently working on a POC how to implement it in the right way.

 As our application will be a background running process, I am not sure how 
 we can implement it with connecting to different client AdWords account 
 which might not be related to our MCC account in any way. And based on the 
 documentation, we should use OAuth2 for the authentication and API access.

 So that part is little gray area for me right now.

 Thanks,
 Bikram.

 On Friday, November 8, 2013 8:21:00 AM UTC-8, Anash P. Oommen (AdWords API 
 Team) wrote:

 Hi Bikram,

 How exactly do you add a client to your system today? Do you ask for 
 their email / password and store it locally, or ask them to invite one of 
 your logins to manage the account, and use that account's username/password 
 to make calls?

 Cheers,
 Anash P. Oommen,
 AdWords API Advisor.

 On Thursday, November 7, 2013 5:29:24 PM UTC-5, Bikram Bhuyan wrote:

 Hello,

 I have tested the sample application for our MCC account and everything 
 is working fine (All the basic API calls). But our requirement is little 
 different.

 We have a windows service which will be accessing the AdWords accounts 
 for our different clients. So no way their accounts will be related to our 
 MCC account which will be the primary account to be used in the windows 
 service. So my question is what is the process we should follow to access 
 the API for our clients, and what is the best way to generate the OAUTH 
 tokens to access the API.

 As it will be totally a back end running program, could you please 
 suggest what the is best practice normally followed in this scenario.

 Thanks,
 Bikram. 



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Generating Refresh Token Automatically (Windows Service Application)

2013-11-08 Thread Anash P. Oommen (AdWords API Team)
Hi Bikram,

How exactly do you add a client to your system today? Do you ask for their 
email / password and store it locally, or ask them to invite one of your 
logins to manage the account, and use that account's username/password to 
make calls?

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Thursday, November 7, 2013 5:29:24 PM UTC-5, Bikram Bhuyan wrote:

 Hello,

 I have tested the sample application for our MCC account and everything is 
 working fine (All the basic API calls). But our requirement is little 
 different.

 We have a windows service which will be accessing the AdWords accounts for 
 our different clients. So no way their accounts will be related to our MCC 
 account which will be the primary account to be used in the windows 
 service. So my question is what is the process we should follow to access 
 the API for our clients, and what is the best way to generate the OAUTH 
 tokens to access the API.

 As it will be totally a back end running program, could you please suggest 
 what the is best practice normally followed in this scenario.

 Thanks,
 Bikram. 


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Generating Refresh Token Automatically (Windows Service Application)

2013-11-08 Thread Bikram Bhuyan
Hi Anash,

Thanks for your reply. Actually it will be a brand new integration we are 
doing with AdWords API. So I am looking for the best possible way to 
implement. So your suggestion and any other tips will be highly helpful as 
we are currently working on a POC how to implement it in the right way.

As our application will be a background running process, I am not sure how 
we can implement it with connecting to different client AdWords account 
which might not be related to our MCC account in any way. And based on the 
documentation, we should use OAuth2 for the authentication and API access.

So that part is little gray area for me right now.

Thanks,
Bikram.

On Friday, November 8, 2013 8:21:00 AM UTC-8, Anash P. Oommen (AdWords API 
Team) wrote:

 Hi Bikram,

 How exactly do you add a client to your system today? Do you ask for their 
 email / password and store it locally, or ask them to invite one of your 
 logins to manage the account, and use that account's username/password to 
 make calls?

 Cheers,
 Anash P. Oommen,
 AdWords API Advisor.

 On Thursday, November 7, 2013 5:29:24 PM UTC-5, Bikram Bhuyan wrote:

 Hello,

 I have tested the sample application for our MCC account and everything 
 is working fine (All the basic API calls). But our requirement is little 
 different.

 We have a windows service which will be accessing the AdWords accounts 
 for our different clients. So no way their accounts will be related to our 
 MCC account which will be the primary account to be used in the windows 
 service. So my question is what is the process we should follow to access 
 the API for our clients, and what is the best way to generate the OAUTH 
 tokens to access the API.

 As it will be totally a back end running program, could you please 
 suggest what the is best practice normally followed in this scenario.

 Thanks,
 Bikram. 



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 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.
For more options, visit https://groups.google.com/groups/opt_out.


Generating Refresh Token Automatically (Windows Service Application)

2013-11-07 Thread Bikram Bhuyan
Hello,

I have tested the sample application for our MCC account and everything is 
working fine (All the basic API calls). But our requirement is little 
different.

We have a windows service which will be accessing the AdWords accounts for 
our different clients. So no way their accounts will be related to our MCC 
account which will be the primary account to be used in the windows 
service. So my question is what is the process we should follow to access 
the API for our clients, and what is the best way to generate the OAUTH 
tokens to access the API.

As it will be totally a back end running program, could you please suggest 
what the is best practice normally followed in this scenario.

Thanks,
Bikram. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 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.
For more options, visit https://groups.google.com/groups/opt_out.