How are examples supposed to be used

36 views
Skip to first unread message

Miguel Angel Garcia

unread,
Jun 28, 2022, 1:10:15 PM6/28/22
to Google Ads API and AdWords API Forum
I'm a programming beginner and I'm struggling to make sense of your official docs and examples. 

I've managed to configure the Oauth process, but I don't really understand how to use the code examples from the client libraries to make a real website/app. 

For example, I want to show the results of https://github.com/googleads/google-ads-python/blob/main/examples/basic_operations/get_campaigns.py on a Python website. 

Are those examples designed for direct use on real websites/apps (can I just copy the example code, call the main function and show the results on a page)? 
Or it is just a basic example designed to run only on the terminal / command line? 

If it's the second, do you have examples or tutorials designed for beginners that want to understand how to use it on real websites?

Thanks!





Google Ads API Forum Advisor

unread,
Jun 28, 2022, 10:35:39 PM6/28/22
to delval...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

Moving forward to answer your questions, Miguel.
  • Are those examples designed for direct use on real websites/apps (can I just copy the example code, call the main function and show the results on a page)? Or it is just a basic example designed to run only on the terminal / command line? 
    • The code example that you sent is designed to run only on the terminal or command line.
  • If it's the second, do you have examples or tutorials designed for beginners that want to understand how to use it on real websites?
    • For this one Miguel, to be honest with you, we cannot find any documentation about this. What we can do is to advise to reach out on Github for python because they are most equipped with regard to this matter.
Feel free to reach out again if you have further concerns.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cE8kg:ref

Marcelo Mazzariol

unread,
Oct 9, 2022, 7:00:01 AM10/9/22
to Google Ads API and AdWords API Forum
On that same subject, I have another question...  Considering one start testes in an fresh Test Account ... so, the account is empty .... so oauth supposed to be working since get_campaings.py returns no errors... so next one desires is to add/create a campaing ...

In order to create a campaign, is there any pre-requeirements to deal first???   Like, create user, or groups first ??? Can I jump to ad_campaign.py or is there a setup path to follow prior to do that?

I believe it more of a Googe Ads questiion, BUT, since the information about the API is so sparse, I/am realy lost... is there any compreensive instrucitions arround?

Best regards

Google Ads API Forum Advisor

unread,
Oct 10, 2022, 2:21:08 AM10/10/22
to devmaz...@gmail.com, adwor...@googlegroups.com
Hi Marcelo,

Thank you for reaching out.

With regard to your concern, you will need to set up your API environment first by following this guide. Then, instead of executing the First Call: Get Campaigns, you can follow this guide for the implementation of create campaigns.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cE8kg:ref
Reply all
Reply to author
Forward
0 new messages