Re: Failed to exchange authorization code for access token.

2021-05-25 Thread manisha tiwari
Hi Team,

Thank you for your response.
The sequence of steps as follows:
1. Obtained credential details from https://console.cloud.google.com/apis
2. Used above credentials in
'AdWords.Examples.CSharp.OAuth.csproj'->web.config' as below:
• Client ID:
454724745580-spfpvqbssfjtfuv63a208uvfc09636ub.apps.googleusercontent.com
• Client secret: zwPVQTFQyzNA9vmKroIF0Wtf
3.Since there is no developer token available in test accounts hence
created the developer token by signing in to the manager account and
fetched the Developer and Customer token from the API Center (TOOLS > MORE
TOOLS > API Center). Set these details on 'web.config' file as mentioned
above in step 2.
• Production Manager account customer ID: 204-576-1531
• Developer Token: tCswbl5yHPJ2oiEVXYopCQ
4. Created Test Account(564-328-9470) for customer client and linked that
to another account(484-489-6005). Then added ad campaign.
• TestAccount account customer ID: 564-328-9470
• Linked manager account customer ID: 484-489-6005
5. Tried to get the campaign using these details and got the error below:
• Failed to get campaigns. Exception says "AdWordsApiException: Exception
of type 'Google.Api.Ads.AdWords.Lib.AdWordsApiException' was thrown.
Customer passed in an invalid token in the header.. (Error:
QuotaCheckError.INVALID_TOKEN_HEADER, FieldPath: Trigger: New developers
must use the Google Ads API.) "

On Fri, 21 May 2021 at 00:06, Google Ads API Forum Advisor Prod <
adsapiforumadvi...@gmail.com> wrote:

> Hi Manisha,
>
> Thank you for reaching out. Could you please share the code and link you
> used to generate the OAuth2 credentials along with the complete request and
> response logs via the *Reply privately to author* option for us to
> further investigate?
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>
> [image: Google Logo]
> Xiaoming
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2HCJYP: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 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAGLyO%2Baw1VKfK5f9XJ-xwO4bXUzcWXaVqMe451GHu2zAcoSKEw%40mail.gmail.com.


RE: Failed to exchange authorization code for access token.

2021-05-20 Thread Google Ads API Forum Advisor Prod
Hi Manisha,

Thank you for reaching out. Could you please share the code and link you used 
to generate the OAuth2 credentials along with the complete request and response 
logs via the Reply privately to author option for us to further investigate?

Thanks and regards,
Xiaoming, Google Ads API Team


Xiaoming
Google Ads API Team
ref:_00D1U1174p._5004Q2HCJYP: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 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/Sr70h0QTF51200qyComTZKTl6gIyjxmChmFg%40sfdc.net.


Re: Failed to exchange authorization code for access token

2018-07-10 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Kieran, 

Thanks for explaining. Since you are using the web application type to 
setup the OAuth, you will need to specify a valid redirect url while 
creating the client credentials in the Google developers console.  
The same redirect 
url should be specified in your code snippet used to generate the tokens. 
The redirect url can be internally hosted applications as well. Please 
check this guide 
 
for 
reference. Once you set your redirect url in the credentials page, you will 
need to ensure to use the same in the code. For instance, the CALLBACK_URL 
variable in Java code sample 

 should 
be having the same url as specified in your credentials page. 

If you are already doing this, could you share a screenshot of your client 
credentials page with the redirect url visible (please be sure to redact 
the client id and client secret before sharing those) along with the code 
snippet that you are using to generate the OAuth tokens? Please use *reply 
privately to author* while sharing the sensitive information. 

Thanks,
Sreelakshmi, 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/da90f15e-8fd9-45cc-8823-12bf3326f918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to exchange authorization code for access token

2018-07-10 Thread Kieran Hewitson
Hi Sreelakshmi,

We have a web application that uses the Adwords client API library and 
authenticates users with an OAuth auth code/access token flow. They receive 
a token from google and manually pass it back to the application.

Since upgrading to the new version of the API, this type of authorisation 
expects a redirect Uri, which we don't have.

I've already tried following the instructions you've linked to, but the 
problem we have is that the web application is internally hosted, and you 
only allow redirect URIs that contain a publicly hosted domain. We don't 
want our application to be hosted publicly. I'm not sure you support this 
as an authentication method any more. We need individuals to authenticate 
as themselves for audit purposes against adwords, but we need to use a flow 
that allows us to use a private callback.

I know it may sound like a bit of a tangent from what the OP is asking, but 
what we have has been working until the API upgrade, and the error we're 
getting has been exactly the same as the OP.

Thanks,

Kieran.

On Monday, July 9, 2018 at 8:44:39 PM UTC+1, Sreelakshmi Sasidharan 
(AdWords API Team) wrote:
>
> Hello, 
>
> Are you using one of our client libraries 
> ? If so, 
> could you please ensure that you are following the setup steps specified 
> under the web application in this section 
> 
>  of 
> the guide? It is also important to make sure that the client credentials 
> are being created as described here 
> .
>  
> Please give this a try and let me know how it goes. If you are still facing 
> issues, could you share more details as to when/ on which API call are you 
> getting this error? If you have the complete logs, please share that as 
> well. Please use reply privately to author while replying. 
>
> Thanks,
> Sreelakshmi, 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/5e72cdd0-a634-4808-a79f-71971a3e55d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to exchange authorization code for access token

2018-07-09 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello, 

Are you using one of our client libraries 
? If so, 
could you please ensure that you are following the setup steps specified 
under the web application in this section 

 of 
the guide? It is also important to make sure that the client credentials 
are being created as described here 
.
 
Please give this a try and let me know how it goes. If you are still facing 
issues, could you share more details as to when/ on which API call are you 
getting this error? If you have the complete logs, please share that as 
well. Please use reply privately to author while replying. 

Thanks,
Sreelakshmi, 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/4ba516f6-b7ba-4369-8666-745e13938700%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to exchange authorization code for access token

2018-07-09 Thread Kieran Hewitson
I'm seeing this exact same issue when upgrading from v201710 of the API to 
v201806.

I have tried using other authorisation flows to get around it, but the web 
application flow doesn't allow for a non-public domain in the oauth 
callback, and our application is completely internal (no public facing 
endpoints).

On Friday, July 6, 2018 at 9:27:04 PM UTC+1, Sreelakshmi Sasidharan 
(AdWords API Team) wrote:
>
> Hi Jianbo, 
>
> Currently, we are not aware of any issues. Are you still facing this 
> error? Could you also share some more information about the error like are 
> you observing this while setting up the OAuth or while using the OAuth 
> credentials that were setup and working previously? You might also want to 
> verify that the credentials in the Google developers console were not 
> modified causing this failure. If you were able to make the API calls 
> previously and you started observing this error recently, could you share 
> your CID and the complete error logs?
>
> Please use *reply privately to author* while sharing this information. 
>
> Thanks,
> Sreelakshmi, 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/e5602778-1560-4be1-aab4-aa2b595abb7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to exchange authorization code for access token

2018-07-06 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Jianbo, 

Currently, we are not aware of any issues. Are you still facing this error? 
Could you also share some more information about the error like are you 
observing this while setting up the OAuth or while using the OAuth 
credentials that were setup and working previously? You might also want to 
verify that the credentials in the Google developers console were not 
modified causing this failure. If you were able to make the API calls 
previously and you started observing this error recently, could you share 
your CID and the complete error logs?

Please use *reply privately to author* while sharing this information. 

Thanks,
Sreelakshmi, 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/8eaa0b9d-490f-4e29-8305-7a2f41988f65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.