0
votes

I get the following error when I try to run sample example of Google adwords

[root@some v200909]# python get_related_keywords.py Traceback (most recent call last): File "get_related_keywords.py", line 53, in page = targeting_idea_service.Get(selector)[0] File "../../aw_api/TargetingIdeaService.py", line 105, in Get 'TargetingIdea', self.__loc, request) File "../../aw_api/WebService.py", line 350, in CallMethod raise ValidationError(error['data']) aw_api.Errors.ValidationError: Invalid headers for 'https://adwords-sandbox.google.com', see http://code.google.com/apis/adwords/docs/developer/adwords_api_sandbox.html#requestheaders. [root@some v200909]#

1
Did you try the url provided? Are your headers consistent with this? code.google.com/apis/adwords/docs/developer/…Vlad the Impala
yes , the link you have pointed is for v13 but the client lib is not working for both v2009 as well as v13dhaval

1 Answers

0
votes

This sounds like an issue with the headers you're providing. The headers must be especially formatted for the sandbox, so make sure that:

a) You're formatting the headers as specified in http://code.google.com/apis/adwords/docs/developer/adwords_api_sandbox.html#requestheaders , as Goose Bumper mentioned. This applies to both v2009 and v13, as you still need to format the developer token and client email according to the instructions (the application token is now obsolete).

b) You're choosing the right endpoint, namely adwords-sandbox.google.com for v2009 and sandbox.google.com for v13

If this still doesn't work for you, the SOAP logs for your request might be useful.