Re: Error while trying to add a LogicalUserList

2015-07-20 Thread Damien
Hi Josh,

Thank you very much, this solved my problem and I've been able to 
successfully create my LogicalUserList.

Damien

On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords API 
Team) wrote:

 Hi Damien,

 I think the issue here is your ruleOperands 
 https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.UserListLogicalRule#ruleOperands.
  
 This attribute should be a list of LogicalUserListOperand 
 https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.LogicalUserListOperands,
  
 each of which in turn has a *child* UserList element.

 So instead of:
   ns1:rules
 ns1:operatorALL/ns1:operator
 ns1:ruleOperands xsi:type=ns1:ExpressionRuleUserList
   ns1:id102489659/ns1:id

 your request should look like:
   ns1:rules
 ns1:operatorALL/ns1:operator
 ns1:ruleOperands
   UserList xsi:type=ns1:ExpressionRuleUserList
 ns1:id102489659/ns1:id
 
 Please give that a try and let me know if you run into any other issues.

 Thanks,
 Josh, AdWords API Team

 On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:

 Hi Josh,

 Here is the Python logger output, you can find the XML request below (all 
 sensitive information replaced by [removed]):

 DEBUG:suds.transport.http:opening (https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
 DEBUG:suds.transport.http:sending:
 URL: https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
 HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
 'Bearer 
 [removed]', 'SOAPAction': b'', 'Content-type': 'text/xml; 
 charset=utf-8', 'Soapaction': b''}
 MESSAGE:
 b'?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope 
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2=
 https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;SOAP-ENV:Headertns:RequestHeadertns:clientCustomerId
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:clientCustomerIdtns:developerToken
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:developerTokentns:userAgent
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed] 
 (AwApi-Python, googleads/3.5.0, 
 Python/3.4.3)/tns:userAgenttns:validateOnly xmlns:tns=
 https://adwords.google.com/api/adwords/cm/v201502;false/tns:validateOnlytns:partialFailure
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:partialFailure/tns:RequestHeader/SOAP-ENV:Headerns0:Bodyns1:mutatens1:operationsns2:operatorADD/ns2:operatorns1:operand
  
 xsi:type=ns1:LogicalUserListns1:name[removed] list created at 20150717 
 14:18:00/ns1:namens1:descriptionUsers who visited list A but not B, C 
 and 
 D/ns1:descriptionns1:UserList.TypeLogicalUserList/ns1:UserList.Typens1:rulesns1:operatorALL/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489659/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 A created at 20150717 14:17:57/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rulesns1:rulesns1:operatorNONE/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489779/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 B created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489899/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 C created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1

Re: Error while trying to add a LogicalUserList

2015-07-17 Thread Damien
Hi Josh,

Here is the Python logger output, you can find the XML request below (all 
sensitive information replaced by [removed]):

DEBUG:suds.transport.http:opening (https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
DEBUG:suds.transport.http:sending:
URL: https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 'Bearer 
[removed]', 'SOAPAction': b'', 'Content-type': 'text/xml; charset=utf-8', 
'Soapaction': b''}
MESSAGE:
b'?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:tns=https://adwords.google.com/api/adwords/rm/v201502; 
xmlns:ns2=https://adwords.google.com/api/adwords/cm/v201502; 
xmlns:ns0=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:ns1=https://adwords.google.com/api/adwords/rm/v201502; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;SOAP-ENV:Headertns:RequestHeadertns:clientCustomerId
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:clientCustomerIdtns:developerToken
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:developerTokentns:userAgent
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed] 
(AwApi-Python, googleads/3.5.0, 
Python/3.4.3)/tns:userAgenttns:validateOnly 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:validateOnlytns:partialFailure
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:partialFailure/tns:RequestHeader/SOAP-ENV:Headerns0:Bodyns1:mutatens1:operationsns2:operatorADD/ns2:operatorns1:operand
 
xsi:type=ns1:LogicalUserListns1:name[removed] list created at 20150717 
14:18:00/ns1:namens1:descriptionUsers who visited list A but not B, C 
and 
D/ns1:descriptionns1:UserList.TypeLogicalUserList/ns1:UserList.Typens1:rulesns1:operatorALL/ns1:operatorns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489659/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
A created at 20150717 14:17:57/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rulesns1:rulesns1:operatorNONE/ns1:operatorns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489779/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
B created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489899/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
C created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102490019/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
D created at 20150717 14:17:59/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rules/ns1:operand/ns1:operations/ns1:mutate/ns0:Body/SOAP-ENV:Envelope'
ERROR:suds.client:suds.sax.document.Document object at 0x10b29f4e0

Thank you for your help,

Damien

On Friday, July 17, 2015 at 9:26

Error while trying to add a LogicalUserList

2015-07-16 Thread Damien
Hi,

I am currently working on creating Remarketing lists. I am using the Google 
AdWords API's Python libraries.

I needed to create a LogicalUserList combining two ExpressionRuleUserList. 
This is the error I got:
suds.WebFault: Server raised fault: 'Cannot construct an instance of 
com.google.ads.api.services.datax.userlists.LogicalUserListOperand because 
it is abstract.  You are probably missing an @Uses annotation while 
invoking public abstract 
com.google.ads.api.services.datax.userlists.UserListReturnValue 
com.google.ads.api.services.datax.adwordsuserlist.AdwordsUserListService.mutate(java.util.List)
 
throws com.google.ads.api.services.common.error.ApiException with params 
[[com.google.ads.api.services.datax.adwordsuserlist.v201502.jaxbgen.UserListOperation@16687106]].'

My source code:
#!/usr/bin/python
#coding=UTF-8

from datetime import date
from datetime import datetime
from datetime import timedelta
from googleads import adwords

(...)

def createNewList(client, list_a, list_b):
  # Initialize appropriate service.
  adwords_user_list_service = client.GetService(
  'AdwordsUserListService', version='v201502')


  rules = [
  {
  'ruleOperands': [list_a],
  'operator': 'ALL'
  },
  {
  'ruleOperands': [list_b],
  'operator': 'NONE'
  }
  ]


  # Create the user list with no restrictions on site visit date.
  combination_user_list = {
  'xsi_type': 'LogicalUserList',
  'name': 'Bouncers list created at %s'
  % datetime.today().strftime('%Y%m%d %H:%M:%S'),
  'description': 'Users who visited list A but not B',
  'rules': rules
  #'startDate': today.strftime('%Y%m%d'),
  #'endDate': end_date.strftime('%Y%m%d')
  }


  # Create operations to add the user lists.
  operations = [
  {
  'operand': user_list,
  'operator': 'ADD',
  } for user_list in [combination_user_list]
  ]


  # Submit the operations.
  user_lists = adwords_user_list_service.mutate(operations)


  # Display results.
  for user_list in user_lists['value']:
print (('User list added with ID %d, name %s, status %s, list type'
' %s, accountUserListStatus %s, description %s.') %
   (user_list['id'], user_list['name'],
user_list['status'], user_list['listType'],
user_list['accountUserListStatus'], user_list['description']))



adwords_client = adwords.AdWordsClient.LoadFromStorage()

createNewList(adwords_client, list_a, list_b)

With list_a and list_b being lists I previously created.

Can anybody tell me what's wrong?

Alternatively, how is it possible to reproduce the Visitors of a page who 
did not visit another page behaviour with the API? The only way seemed to 
used combination lists but even is failing (see the error above)...


Thanks for your help,

Damien

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b901096d-7163-4f66-b99c-cb3d28dac86a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[QuotaCheckError.INCOMPLETE_SIGNUP @ ; trigger:'null']

2013-03-05 Thread Damien Shiells


Trying to connect to the Google AdWords API and when running 
GetCampaigns.php from the PHP API examples, I get the following error:

 

An error has occurred: [QuotaCheckError.INCOMPLETE_SIGNUP @ ; 
trigger:'null']

 

According to someone at adwordsapi-tok...@google.com everything looks fine 
from their end and someone will be in contact with me shortly, but it's 
been weeks and I've had to contact - or even a reply to my follow ups.

 

I have tried using the online chat system however I was told he would guide 
me to where I will find more info, then finished the Chat - very 
frustrating!

 

Can anyone help? Even an e-mail to send the query to (a query that is very 
quickly becoming a complaint!)

 

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.




Using OAuth2 for server application

2012-12-10 Thread Damien
Hi,

We miss clear explanations tu use OAuth2 for server to server application.
How to not change my token every time my app starts ?

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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





[API v201209] How to handlePolicyViolationError in a Bulk

2012-11-09 Thread Damien
Hello,

We are experiencing some problems in migrating to API v201209.
We send TextAds in a Bulk, using MutateJobOperation and 
SimpleMutateJob.mutate()
How to handle PolicyViolationError in this bulk ?

With previous version we had used 
BulkMutateJob[].result.operationStreamResults but now this doesn't work.

Can you help us please ?

Thanks.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Job.status.PENDING via Bulk

2012-11-08 Thread Damien
Hi guys,

We try to send 3000 TextAds via Bulk.
Using SimpleMutateJob.mutate() 

The Job.status is PENDING whereas all TextAds are published...

The jobid is -3999508065829818777

Is it normal ? How to resolve it ?

Thanks !

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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