Manage customers campains

47 views
Skip to first unread message

Martin Piták

unread,
Jan 8, 2018, 12:13:02 AM1/8/18
to AdWords API Forum
Hello, we are developing web application that would automate some campaign management task. But I have trouble figuring out how to do this. We use django and django-allauth to auth our customers, and with django-allauth i get access-token and refresh-token, but with only these two I am unable to access the customers AdWords account. I followed the guide but to no avail as it's not really good in my opinion. I made developer token, and have my client-id and my client-secret. But even with these five things, i am still unable to access the users AdWords account. What do I need to do to access the customers AdWords account?

Many thanks for any help or guidance.

Vincent Racaza (AdWords API Team)

unread,
Jan 8, 2018, 1:10:50 AM1/8/18
to AdWords API Forum
Hi Martin,

Since you are not using one of our client libraries, then what I can provide you is the general guide of the API call structure. The guide provides you the parameters (clientCustomerid, access token, developer token) that should be present when making a request and how to structure it. Could you confirm if you have followed this guide and still you are unable to access your client's AdWords account?

If you have followed the guide and the issue still persists, then can you provide the SOAP request and response logs or any error stacktrace via Reply privately to author so I can further check?

Thanks,
Vincent
AdWords API Team

Martin Piták

unread,
Jan 8, 2018, 2:22:00 PM1/8/18
to AdWords API Forum
I forgot to add that i use python googleads library.

Vincent Racaza (AdWords API Team)

unread,
Jan 22, 2018, 1:59:19 AM1/22/18
to AdWords API Forum
Hi Martin,

For the benefit of other users who may see this post, I will just summarize your issue and the recommendations that I provided:
  • Issue: You were not able to access your AdWords account with your client ID, client secret and developer token to manage campaigns.
  • Recommendation:
    • I suggested that you use a clientCustomerId in accessing an AdWords account. To get the list of clientCustomerIds associated to your OAuth2 credential, I recommended to run the CustomerService.getCustomers() without specifying the clientCustomerId in the property file.
    • The next step would be to specify the MCC Id (returned in the first step) in the property file and run the Get Account Hierarchy example. This way, all the client accounts under the manager account will be retrieved.
    • You can then specify again the clientCustomerId in the property file as client account, and not a manager account, in getting the campaigns via CampaignService.get() as campaigns actually belong to a client account and not to a manager account.
Reply all
Reply to author
Forward
0 new messages