Hi 

    public long LookAudienceIdUsingName(string name)
    {
      AdwordsUserListService userListService =
        (AdwordsUserListService)_user.GetService(
          AdWordsService.v201809.AdwordsUserListService);

      string query = $"SELECT Id, Name, Status, AccountUserListStatus Where 
Name = '{name}' ORDER BY Id Desc";
      int offset = 0;
      int pageSize = 1;
      UserListPage page = new UserListPage();

      string queryWithPaging = $"{query} LIMIT {offset}, {pageSize}";
      page = userListService.query(queryWithPaging);

      foreach (UserList userList in page.entries)
        return page.entries[0].id;

      return 0;
    }

The above is my C# code to get an audience Id calling AdWords API - this 
works fine no problem. 

I'm now migrating our integration to Google Ads API. Can you please provide 
a sample code that do the same as the above ? I couldn't find one.

Thanks.
Sarah

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/a4dcfac3-42dc-4a42-9fc5-86b744b44390%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • How to ... IntegrationDeveloper
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to