How to resolve INVALID_USER_LIST error

2017-07-19 Thread stephen . waters . scripts
Hi,

I have a python script to upload some crm based lists.
It was working but now produces the following error

Server raised fault: '[MutateMembersError.INVALID_USER_LIST_ID @ 
operations[0].o
perand.userListId; trigger:'UserListId: *listid*']'

^*listid* is 9 chars long and all numbers.

the mutate members operation looks like:

  mutate_members_operation = {
  'operand': {
  'userListId': user_list_id,
  #'dataType': 'EMAIL_SHA256',
  'membersList': hashed_emails
  },
  'operator': addremove
  }

where addremove either equals 'ADD' or 'REMOVE', hashed_emails is what it 
sounds like, as is user_list_id. I am using v201705. Is there anything I am 
obviously doing wrong?

Thanks

Stephen

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+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 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/87c73387-91e3-47ae-a052-74d0c0d27e5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieve a list of existing shared audiences (particularly CRM)

2017-03-31 Thread stephen . waters . scripts
Thanks Vishal, that's perfect!

On Monday, March 27, 2017 at 8:43:09 PM UTC+1, Vishal Vinayak (Adwords API 
Team) wrote:
>
> Hi Stephen,
>
> Once you have initialized the service, you can create a service selector 
> to specify the fields that you wish to retrieve via the service (complete 
> list of fields available here 
> 
> ). 
>   
> campaign_service = client.GetService('AdwordsUserListService', 
> version='v201702')
>
>   # Construct selector and get all campaigns.
>   offset = 0
>   selector = {
>   'fields': ['Id', 'Name', 'Status'],
>   'paging': {
>   'startIndex': str(offset),
>   'numberResults': str(PAGE_SIZE)
>   }
>   }
>
> You can then specify the selector in the AdwordsUserListService.get 
> 
>  (as 
> follows) to retrieve the lists in your account:
>   
>  page = campaign_service.get(selector)
>
> You can use the ListType 
> 
>  field 
> in the selector to filter 
> 
>  on 
> the CRM_BASED lists only. 
> Hope this helps. Please revert if you have additional questions or 
> concerns. 
>
> Regards,
> Vishal, 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+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 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/c14e8684-89f7-40e0-b0d1-e29f854032a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Retrieve a list of existing shared audiences (particularly CRM)

2017-03-27 Thread stephen . waters . scripts
Hi

I'm a fairly amateurish python user currently creating/updating CRM user 
based audiences using googleads.

While I've been able to do the above, is it possible to retrieve a list of 
(all, or just CRM) audiences that exist? names and ids would be more than 
enough info

I am guesing it involves:
user_list_service = client.GetService('AdwordsUserListService', 
version='v201702')
but what I would need to do to user_list_service to get the data I require.

I do something similar with facebookads by using:

audiences = 
my_account.get_custom_audiences(fields=[CustomAudience.Field.name])
audiences = [{"id":d['id'], "name":d['name']} for d in audiences]

Any advice appreciated, cheers

Stephen

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+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 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/e4d349aa-db0e-423e-9043-942d92f654c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.