Re: How get CustomerId with OAuth 2.0

2017-07-13 Thread 'Ivan Bautista' via AdWords API Forum
Hi, Just to clarify, do you wish to get the Customer ID associated with your generated OAuth2 credentials? If yes, then you may do so by using the CustomerService.getCustomers() along with the OAut

How get CustomerId with OAuth 2.0

2017-07-13 Thread davidg
Hello I want to get the customerID with an auth auntenticacion help -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=

Re: How get CustomerId with OAuth 2.0

2017-02-15 Thread 'Anash P. Oommen (AdWords API Team)' via AdWords API Forum
Hi Francesco, The https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201609/AccountManagement/GetAccountHierarchy.php code example should help you achieve your workflow, but for that to work, the access token you send as part of the request should belong to the logge

Re: How get CustomerId with OAuth 2.0

2017-02-10 Thread Francesco Protano
Hello the u suggested it s for .net my code is for php but it s not important, i think it will an similar solution to capture the soap messages. U seems an expert adwords advice , so, can u send to me an example to archieve my workflow? But first is it possible ? Thk for the reply -- -- =~=~

Re: How get CustomerId with OAuth 2.0

2017-02-10 Thread 'anash' via AdWords API Forum
Hi Francesco, I wonder if you are mixing up the access token somewhere (between the user's access token and a hardcoded debug access token). Could you turn on logging following the instructions on https://github.com/googleads/googleads-dotnet-lib/wiki/How-to-capture-SOAP-messages (it will al

Re: How get CustomerId with OAuth 2.0

2017-02-10 Thread Francesco Protano
Hi nadine i guess you are .net expert programmer but i think u are able to explain where i wrong. My goals is to pick all the accounts of a user who have and manage in his an adwords account . I followed all steps suggested from the google guide. After the i taken the access token of the logged

Re: How get CustomerId with OAuth 2.0

2017-02-10 Thread Francesco Protano
Hi nadine i guess you are .net expert programmer but i think u are able to explain where i wrong. My goals is to pick all the accounts of a user who have and manage in his an adwords account . I followed all steps suggested from the google guide. After the i taken the access token of the logged

Re: How get CustomerId with OAuth 2.0

2015-04-13 Thread Marcin Gdak
Hi Anash, Thank you for help. In my opinion, that oauth is already acting. I get CustomerId. I would like to get the e-mail address of the user, but my code isn't work. My code: CustomerService customerservice = (CustomerService)user.GetService(AdWordsService.v201502.CustomerService);

Re: How get CustomerId with OAuth 2.0

2015-04-08 Thread Marcin Gdak
Hi Nadine, Still my refresh token is empty. My logs: AdsClientLibs.RequestInfoLogs Information: 1 : host=accounts.google.com,url=/o/oauth2/token,Content-Type: application/x-www-form-urlencoded, Host: accounts.google.com, TimeStamp: Wed, 08 Apr 2015 15:56:00 GMT, code=4%2feZigbElUJzTfPvRzDcgv

Re: How get CustomerId with OAuth 2.0

2015-04-03 Thread Nadine Sundquist (AdWords API Team)
Hi Marcin, Let me recap the process that you're following. It should be this: 1. Follow the OAuth2 ASP.NET code example on how to do an OAuth2 flow and capture the access and refresh token. 2. Set the access and refresh token to user.Config dynamically at runtime and call CustomerSe

Re: How get CustomerId with OAuth 2.0

2015-04-03 Thread Marcin Gdak
Hi Nadine, I try this, but "oAuth.RefreshToken" is empty. I noticed that the same I could not get the user e-mail. If I put a clientCustomerId in my web.config, then I have a full access to Adwords API. RefreshToken must be good but I can't pick it up :( -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~

Re: How get CustomerId with OAuth 2.0

2015-04-02 Thread Nadine Sundquist (AdWords API Team)
Hello, Once you issue the line of code, your *oAuth* (OAuth2ProviderForApplications) instance will be populated with a refresh token. oAuth.FetchAccessAndRefreshTokens(Request.Params["code"]); You can try accessing the refresh token and setting it in the *config* (AdWordsAppConfig) before m

Re: How get CustomerId with OAuth 2.0

2015-04-02 Thread Marcin Gdak
Thank for your replies :) I have another problem. I am working with the option 2. My code: AdWordsUser user = new AdWordsUser(); CustomerService customerservice = (CustomerService)user.GetService(AdWordsService.v201502.CustomerService); long customerId = customerservice.get().customerId; ->

Re: How get CustomerId with OAuth 2.0

2015-04-01 Thread Nadine Sundquist (AdWords API Team)
Hello, You can pick from one of the two options depending on what you need. *Option 1* - *Use Case:* You want to store your *clientCustomerId* in your web.config, and you want to retrieve it at runtime. - *Solution:* Check out this wiki post

Re: How get CustomerId with OAuth 2.0

2015-04-01 Thread Marcin Gdak
Hi Nadine, If I don't put a clientCustomerId in my web.config, then OAuth is returning the error "CustomerID is required". I am using the help given on the side https://github.com/googleads/googleads-dotnet-lib/wiki/Using-OAuth2 In section "Scope" I have link to Adwords. In settings the user ac

Re: How get CustomerId with OAuth 2.0

2015-04-01 Thread Nadine Sundquist (AdWords API Team)
Hi Marcin, If you don't put a clientCustomerId in your web.config, then the clientCustomerId passed back from the Customer object is the clientCustomerId related to your OAuth credentials. Based on your explanation and the error that is being returned, it sounds like you may be trying to acces

Re: How get CustomerId with OAuth 2.0

2015-04-01 Thread Marcin Gdak
Hmm I am getting Idas but only then when the same I have written down in webconfig. If it is different I am getting the error AuthorizationError.USER_PERMISSION_DENIED. My code in C# CustomerService customerservice = (CustomerService)user.GetService(AdWordsService.v201502.CustomerService); Cu

Re: How get CustomerId with OAuth 2.0

2015-04-01 Thread Marcin Gdak
It works for me. Thanks for the helpful tips. W dniu wtorek, 31 marca 2015 21:35:51 UTC+2 użytkownik Nadine Sundquist (AdWords API Team) napisał: > > Hello Marcin, > > Once you've authenticated, you can retrieve the current customer id from > the Customer Service >

Re: How get CustomerId with OAuth 2.0

2015-03-31 Thread Nadine Sundquist (AdWords API Team)
Hello Marcin, Once you've authenticated, you can retrieve the current customer id from the Customer Service . The Customer

How get CustomerId with OAuth 2.0

2015-03-31 Thread Marcin Gdak
Hi, How get Customer ID of the user with OAuth 2.0 web flow. How I wrote down by hand customer id in webconfig, that's all is acting. But I need to take the id after the Authorization. How I can get Customer Id of the user? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us