Thursday, 28 April 2016

Automatically get ClientcustomerId from adwords api version v201601


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.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3ba8e3de-b5bf-4338-a6b8-b6c7fc88a6ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment