Tuesday, 22 November 2016

Re: how to get client customer id of logged in user in js or in php

Hi Vishal ,
              i already have developer token created from a manager account , and using oauth credentials generated from a test manager account ,
as u said i can set clientCustomerId dynamically in any php file like below

  $user = new AdWordsUser();
  $user->SetClientCustomerId('CLIENT_CUSTOMER_ID_HERE');

or i can set it in auth.ini as well like below :

clientCustomerId = "INSERT_CLIENT_CUSTOMER_ID_HERE"

this can only be done if i already know the client id , i can only know the client id of mine , but what if another user wants to use my api ?
as api needs clientCustomerId to process and perform operation, what step should i follow to get clientCustomerId of a new adwords user or the others user who wants to use my api to see their campaign,ads related data?

this api will be like a system in which any user can sign in and can see the data(campaign,ads, ads statistics) related to their adwords account 

in simple words , i am creating an api system where not only i can sign in and see campaign and ads related data of my adwords account,
as any other adwords user can also sign in and can see data associated with their adwords account ..


please let me know if it is feasible and if it feasible . what step should i follow to make it work like as desired :)

On Tuesday, November 22, 2016 at 10:03:37 PM UTC+5:30, Vishal Vinayak (Adwords API Team) wrote:
Hi,

AdWords API doesn't authenticate using email/username and password combination. Instead, authentication happens using OAuth2, details for which are available here. In other words, to connect an external tool to an AdWords account via the API, you need two things: a developer token (associated with a manager account) and valid OAuth credentials (which includes client ID and client secret). OAuth credentials can be created using any email address associated with the target AdWords account or the manager account of the target AdWords account. As long as this configuration is available in the external tool, the tool would be able to access the data of the target AdWords account. 

Please revert if you have more questions.

Regards,
Vishal Vinayak, AdWords API Team

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscribe@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+unsubscribe@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/54abbc56-c3cd-4271-a6f9-f15caa3b81b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment