Hello,

Again started to facing the issue after passing 'approval_prompt' => 
'force''.

The 'approval_prompt' => 'force' is not working as expected.
If I pass the 'approval_prompt' => 'force', it is not asking user to 
authorize app forcefully If I had login with already authorized adwords 
account.

Also It is not returning refresh_token with $user->GetOAuth2Info() under 
below code.

$OAuth2Handler = $user->GetOAuth2Handler();
$user->SetOAuth2Info($OAuth2Handler->GetAccessToken($user->GetOAuth2Info(), 
$code, $redirectUri));
$user->GetOAuth2Info();

Thanks,

On Monday, 15 July 2013 14:26:29 UTC+5:30, Chirag wrote:
>
> Hello Anash,
>
> Thanks, Issue filed.
> Please see the link.
>
> https://code.google.com/p/google-api-adwords-php/issues/detail?id=102
>
> Thanks,
> Chirag
>
> On Monday, July 15, 2013 12:20:26 PM UTC+5:30, Anash P. Oommen (AdWords 
> API Team) wrote:
>>
>> Hi Chirag,
>>
>> Could you kindly file an issue under 
>> https://code.google.com/p/google-api-adwords-php/issues/list if that 
>> feature is not supported? I'll ask the PHP library maintainers to follow up 
>> with you over the issue tracker.
>>
>> Cheers,
>> Anash
>>
>> On Monday, July 15, 2013 11:25:15 AM UTC+5:30, Chirag wrote:
>>>
>>> Hi Anash,
>>>
>>> Thanks for your reply. 
>>> But how i can take care this with PHP Client library. I think there is 
>>> no scope for this under v201306.
>>>
>>>
>>>
>>> On Monday, June 10, 2013 2:52:49 PM UTC+5:30, Anash P. Oommen (AdWords 
>>> API Team) wrote:
>>>>
>>>> Hi Chirag,
>>>>
>>>> If you want to force users to be authenticated, then you can build your 
>>>> OAuth2 request with approval_prompt: force. See 
>>>> https://developers.google.com/accounts/docs/OAuth2WebServer for 
>>>> details.
>>>>
>>>> Cheers,
>>>> Anash P. Oommen,
>>>> AdWords API Advisor.
>>>>
>>>> On Thursday, June 6, 2013 12:16:28 PM UTC+5:30, Chirag wrote:
>>>>>
>>>>> Hi David,
>>>>>
>>>>> As you said 
>>>>>
>>>>> Later on if the user wants to grant you permissions to a different 
>>>>> AdWords account (a different clientCustomerId) then he will need to 
>>>>> logout 
>>>>> and log back in with the credentials of his other AdWords account, but 
>>>>> the 
>>>>> OAuth2 client ID remains the same because this ID identifies your 
>>>>> application and not the user AdWords account. 
>>>>>
>>>>> - In this case if user is forgot to logout and he tries to 
>>>>> authenticate the application, than it directly giving refresh token 
>>>>> without 
>>>>> asking user for permission to allow as user has already allowed 
>>>>> previously. 
>>>>> My question is that only why user is not redirected to grant permission 
>>>>> page.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Chirag
>>>>>
>>>>> On Thursday, May 16, 2013 9:48:41 PM UTC+5:30, David Torres (AdWords 
>>>>> API Team) wrote:
>>>>>>
>>>>>> Hi Chirag,
>>>>>>
>>>>>> I think the problem comes from a misunderstanding of the term client 
>>>>>> ID. OAuth2 client ID is not the same of the AdWords clientCustomerId, 
>>>>>> the 
>>>>>> OAuth2 client ID which you get through the API Console identifies your 
>>>>>> application, while the clientCustomerId identifies the AdWords account 
>>>>>> you 
>>>>>> want to access. So requesting access to the AdWords account (access 
>>>>>> token 
>>>>>> and refresh token) requires you pass the OAuth2 client ID that 
>>>>>> identifies 
>>>>>> your application and tells the user that your application wants to 
>>>>>> access 
>>>>>> his account, at that point the user needs to login using his AdWords 
>>>>>> credentials so the generated access and refresh tokens are granting 
>>>>>> permissions to the right AdWords account. Later on if the user wants to 
>>>>>> grant you permissions to a different AdWords account (a different 
>>>>>> clientCustomerId) then he will need to logout and log back in with the 
>>>>>> credentials of his other AdWords account, but the OAuth2 client ID 
>>>>>> remains 
>>>>>> the same because this ID identifies your application and not the user 
>>>>>> AdWords account. That is because we recommend you use MCCs to access 
>>>>>> multiple AdWords accounts, so the user just grants you access to his MCC 
>>>>>> account - once - and then you'll have access to all his linked client 
>>>>>> AdWords accounts.
>>>>>>
>>>>>> I hope this clarifies the workflow of OAuth2. Let me know if I'm 
>>>>>> missing something.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> - David
>>>>>>
>>>>>> On Sunday, May 12, 2013 2:54:23 AM UTC-7, Chirag wrote:
>>>>>>>
>>>>>>> Hello David,
>>>>>>>
>>>>>>> I am using PHP Client Library.
>>>>>>>
>>>>>>> Here is more details.
>>>>>>>
>>>>>>> Let's assume i have one adwords mcc account x...@gmail.com.
>>>>>>> For first time authentication i need allow access to my web 
>>>>>>> application for access token and refresh token. i do allow and link my 
>>>>>>> one 
>>>>>>> client id at that time.
>>>>>>>
>>>>>>> Now let's say i need to link other client id using same email 
>>>>>>> x...@gmail.com for same web app.
>>>>>>> Now oauth 2.0 is not asking me to allow access it directly gives me 
>>>>>>> refresh token, as i have already authenticate web app.
>>>>>>> This was not the case with Oauth1.0a, every time i need to link 
>>>>>>> client id i need to allow access.
>>>>>>>
>>>>>>> So this was my situation. I have a system where user can link there 
>>>>>>> client ids and fetch the customize reports for diffrent client ids.
>>>>>>>
>>>>>>> Please suggest me how i can use oauth 2.0 like we do with Oauth 1.0a 
>>>>>>> where i cam easily manage diffrent client ids with same mcc account.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Friday, May 10, 2013 7:44:47 PM UTC+5:30, David Torres (AdWords 
>>>>>>> API Team) wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm a bit confused with your question, are you asking how to 
>>>>>>>> switch/store access tokens in one of our client libraries? if yes, 
>>>>>>>> which 
>>>>>>>> library? can you outline in more detail the steps/code you are 
>>>>>>>> executing?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> - David Torres - AdWords API Team
>>>>>>>>
>>>>>>>> On Tuesday, May 7, 2013 3:19:17 AM UTC-4, Chirag wrote:
>>>>>>>>>
>>>>>>>>> Hello All,
>>>>>>>>>
>>>>>>>>> I am having a system in which multiple accounts can link in order 
>>>>>>>>> to get diffrent adwords account details.
>>>>>>>>>
>>>>>>>>> I am facing issue with Oauth2.0 authentication.
>>>>>>>>> when first time i am allowing access using Oauth2.0 to access 
>>>>>>>>> adwords client information, then system asking me to allow access 
>>>>>>>>> permission, but when i tried to link other adwords (client id)account 
>>>>>>>>> under 
>>>>>>>>> system for other clientid with google account already logged In with 
>>>>>>>>> access 
>>>>>>>>> permisiion allowed than it is directly giving me the old account's 
>>>>>>>>> access 
>>>>>>>>> token permission for other account also.
>>>>>>>>>
>>>>>>>>> Can we have any other way so that i can directly logout the 
>>>>>>>>> adwords account when once allowed access done?
>>>>>>>>>
>>>>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f3783608-c5a6-4538-a248-bd20ea358e48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: Oauth2.0 di... Chirag
    • Re: Oauth2... 'Anash P. Oommen (AdWords API Team)' via AdWords API Forum

Reply via email to