Hi,

I see - I think the problem is that the project you created in the 
Developers Console is a *Web application*, but OAuthTokenGenerator.exe 
assumes you have a *Native application*. If you create a *Native 
application* as described here 
<https://github.com/googleads/googleads-dotnet-lib/wiki/How-to-create-OAuth2-client-id-and-secret#1-native-application>
 and 
use that application's client ID and client secret, then the generator 
should work as expected.

As an aside, what's happening right now with your *Web application* is that 
after you authorize, the OAuth server is redirecting you to your *Web 
application*'s redirect URL. See the OAuth Web application flow 
<https://developers.google.com/accounts/docs/OAuth2#webserver> for details.

Cheers,
Josh, AdWords API Team

On Monday, October 20, 2014 11:16:19 AM UTC-4, Shruti wrote:
>
> Hi Josh,
>
> Thanks for the reply. I have gone through the step by step instructions 
> for generating the refresh token.
>
> I'm using the OAuthTokenGenerator.exe, entering my clientID and the client 
> secret after which I can see the consent screen.
> Once I click the 'Accept'  button, I see a screen showing RavenDB 
> documents which are empty. (Please see screen shot in my previous post).
>
> Not sure if I am missing something or if the exe is not working as 
> expected.
>
> Thanks.
>
> On Saturday, October 18, 2014 8:58:52 AM UTC-4, Josh Radcliff (AdWords API 
> Team) wrote:
>>
>> Hi,
>>
>> Sorry to hear this process has been frustrating for you. Have you looked 
>> at the step-by-step instructions for OAuth2 on the .NET library's wiki 
>> pages?
>>
>>
>> https://github.com/googleads/googleads-dotnet-lib/wiki/Using-OAuth2TokenGenerator
>>
>> The *invalid_client* message you received in step 5 usually means that 
>> the *client ID *or *client secret* are incorrect. If that's not the 
>> issue and the step-by-step instructions don't help, please post a reply 
>> here. Note that if you need to send any sensitive information along to me 
>> for troubleshooting you can do so by clicking the *Reply to Author*
>>  option.
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Friday, October 17, 2014 3:55:23 PM UTC-4, Shruti wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to migrate an application from using ClientLogin to oAuth2. I 
>>> have followed the instructions as given here - 
>>> https://developers.google.com/adwords/api/docs/guides/clientlogin-to-oauth2-single-mcc
>>>  
>>> and https://developers.google.com/adwords/api/docs/guides/authentication
>>>
>>> As indicated, I have 
>>> 1. created a new project in the developer console.
>>> 2. added credentials for installed application and generated the 
>>> clientId and client secret.
>>> 3. set up the consent form with email and the product name
>>> 4. used the client library utility to generate the authorization code
>>> 5. Copied the authorization code back to the client library utility to 
>>> exchange it for access token and the refresh token (which resulted in 
>>> invalid client)
>>>
>>> 6. So, I finally I used the oauth playground (note - I used the sandbox 
>>> scope) to get the access token and refresh token and used these in my 
>>> application config.
>>>
>>> But still get the below error - 
>>>
>>> {"Failed to refresh access token.\n{\n  \"error\" : 
>>> \"unauthorized_client\"\n}"}
>>>
>>> I find all this process just to obtain the authorization to access my 
>>> older adwords account too frustrating. Can you please help me identify if 
>>> I'm missing anything here?
>>>
>>> Any urgent help will be appreciated.
>>>
>>> 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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/be44db1d-f6e5-401b-94a8-b47c3fe4f165%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to