Hi Brihaspati,

One important point is that the client_id and client_secret are for *your* 
application--the 
user never creates these.  You should use the same client_id and 
client_secret for all of your application's OAuth2 requests, as this is 
what identifies your application.  The OAuth2 flow is meant to authorize a 
specific application, identified by client_id and client_secret, for access 
to a user's account in a specific scope (the AdWords scope, in this case).

One way or another, you will have to prompt the user for credentials at 
some point. For your use case you could create a *web application* in the 
console, which will require you to specify a redirect URL. If you use the 
web application's client_id and client_secret in your OAuth2 requests then 
instead of having to copy and paste the authorization code as in 
GetRefreshToken, the redirect URL will receive the authorization code and 
should then exchange it for a refresh token, which you should store and use 
for all future requests against that user's account. This flow is described 
in detail here <https://developers.google.com/accounts/docs/OAuth2WebServer>
.

Cheers,
Josh, AdWords API Team

On Friday, March 14, 2014 2:40:09 AM UTC-4, [email protected] wrote:
>
>
> Hello Josh,
>
> Thanks for suggesting me this way but i am finding it difficult because in 
> order to generate the refresh token we have to pass client_id and 
> client_secret which is generated by creating an application on API Console 
> - Google Code and after creating this i have to run GetRefreshToken.php 
> with these parameters->developerToken, userAgent, clientCustomerId, 
> client_id, client_secret and also on command line and then i have to sign 
> in with the invited account user credentials and after that i have to 
> manually copy paste the url to generate a piece of code and then this piece 
> of code is entered again in the command line to generate refresh token and 
> after that i can accept the invitation. I can develop a script which ass 
> the user its client_id, client_secret but this seems to be too complex for 
> a normal user any normal user can't be a developer to do this. 
> So can you please suggest me in this whole process where am i wrong ?? 
> and also is there any other way other than this i can achieve the results  
> ?? 
> If not then i am left with only option-> i have to tell invited user to 
> manually login and accept the invitation request sent by the MCC User. 
> Please Suggest !
>
> Regards,
> Brihaspati Dev
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to