Getting authenticationerror.login_cookie_required error while using Google adwords API with Python
Question: I am trying to use python to consume some adwords soap API, I am able to get
the auth token but when I try to make a get request I got the
authenticationerror.login_cookie_required error. Any ideas?

    
    
    from suds.client import Client
    
    auth_data = {'accountType':'GOOGLE', 'Email':'xxx@xxx.com', 'Passwd':'xxxxxxxx', 'service':'adwords', 'source':'xxxxxxxxxx'}
    auth_data = urllib.urlencode(auth_data)
    auth_request = urllib2.Request('https://www.google.com/accounts/ClientLogin', auth_data)
    auth_response = urllib2.urlopen(auth_request)
    auth_response = auth_response.read()
    split = auth_response.split('=')
    auth_token = split[len(split)-1]
    
    url = 'https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService?wsdl'
    client = Client(url)
    authToken = auth_token
    developerToken = 'xxx@xxx.com++NZD'
    userAgent = 'jameslin-python'
    client.set_options(soapheaders=(authToken,developerToken,userAgent))
    client.service.get()
    


Answer: Have you tried using the Python client library for the AdWords API?
<http://code.google.com/p/google-api-ads-python/>

