Automatically get ClientcustomerId from adwords api version v201601

26 views
Skip to first unread message

Bhasker Vengala

unread,
Apr 29, 2016, 9:06:02 AM4/29/16
to AdWords API Forum

I'm using adwords api version v201509 . now i want to migrate this version to v201601.

Here i'm getting error while accessing customer id and name.

Here is my code. 


            AdWordsUser adWordsUser = new AdWordsUser();
            (adWordsUser.Config as AdWordsAppConfig).DeveloperToken = Globals.ThisAddIn.AdWordsDeveloperToken;
            (adWordsUser.Config as AdWordsAppConfig).OAuth2RefreshToken = refreshtoken;
            (adWordsUser.Config as AdWordsAppConfig).OAuth2ClientId = Globals.ThisAddIn.AdWordsClientId;
            (adWordsUser.Config as AdWordsAppConfig).OAuth2ClientSecret = Globals.ThisAddIn.AdWordsClientSecretId;

 var customerService = (CustomerService)adWordsUser.GetService(AdWordsService.v201509.CustomerService);
            Customer customer = new Customer();
            customer = customerService.get();


this code works fine , and i'm getting customer details from customerservice.

the problem is with v201601, i updated same here, here i'm getting error like client_customer_id_invalid.

Can anyone suggest me , how , i solve the issue.

Anthony Madrigal

unread,
Apr 29, 2016, 9:31:41 AM4/29/16
to AdWords API Forum
Hi Bhasker,

I do not see anywhere in your code where you set the clientcustomerId. Are you sure you are setting it? Also, for the line " var customerService = (CustomerService)adWordsUser.GetService(AdWordsService.v201509.CustomerService);", did you change v201509 to v201601?

If you have done all these things and are still getting this error, please reply privately to author the SOAP request and response you are getting.

Regards,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages