Get Started | Ad Manager API - Google Developers
文章推薦指數: 80 %
Developers can use the Google Ad Manager API to build applications that manage inventory, create orders, pull reports, and more. The Ad ...
Google
AdManager
API
English
BahasaIndonesia
Deutsch
Español
Français
Português–Brasil
Русский
中文–简体
日本語
한국어
Signin
Guides
Reference
Samples
Support
Google
AdManager
API
Guides
Reference
Samples
Support
GetStarted
Authentication
PQLGuide
ThirdParties
BasicConcepts
HowTo
Reports
Forecasts
Native
Programmatic
BestPractices
TestNetworksvs.Production
Home
Products
AdManager
API
Sendfeedback
GetStarted
Stayorganizedwithcollections
Saveandcategorizecontentbasedonyourpreferences.
DeveloperscanusetheGoogleAdManagerAPItobuildapplicationsthat
manageinventory,createorders,pullreports,andmore.
TheAdManagerAPIusesSOAP;tohelpyougetstarted,weofferclientlibrariesforJava,.NET,Python,PHP,andRuby.To
makeyourfirstAPIrequest,followthestepsbelow.
GetaccesstoanAdManagernetwork
Ifyoudon'talreadyhaveone,signupforanAdManager
account.Youcanalsocreateatestnetworkif
youwanttotesttheAPIinaseparateenvironment.Notethatyoudonotneed
anAdSenseaccountfortestpurposes.
Makeanoteofyournetworkcode.You'llfindthisintheURLwhenyouare
loggedintoyournetwork.Forexample,intheURL
https://admanager.google.com/1234#home,1234isyour
networkcode.
ByusingtheAdManagerAPIyouagreetotheTerms
ofService.
Createauthenticationcredentials
YoumustauthenticateallAdManagerAPIrequestsusingOAuth2.Thesteps
belowcoverthesimpleusecaseofaccessingyourownAdManagerdata.
Formoredetailsandotheroptions,seeAuthentication.
OpentheGoogleAPIConsoleCredentialspage.
Fromtheprojectmenu,chooseCreateproject,enteranameforthe
project,andoptionally,edittheprovidedProjectID.Click
Create.
OntheCredentialspage,selectCreatecredentials,then
selectServiceaccountkey.
SelectNew
serviceaccount,andselectJSONasthekeytype.
ClickCreatetodownloadafilecontainingaprivatekey.
ConfigureyourAdManagernetwork
Sign
intoGoogleAdManager.
Inthesidebar,clickAdmin>Globalsettings.
UnderGeneralsettings>Apiaccessclickthesliderto
Enabled.
ClicktheSavebuttonatthebottomofthepage.
Setupyourclient
DownloadoneoftheAdManagerclient
libraries.Thelibrariesofferwrapperfunctionsandfeaturesthatmakeit
easierandfastertodevelopapplications.
Thetabsbelowprovidequickstartsforcodingineachofthelanguagesfor
whichthereisaclientlibrary.
Java
HereisabasicexamplethatshowshowtousetheJavaclient
library.Formoredetailedusageinformation,referto
theREADME
fileintheclientlibrarydistribution.
Setupyourcredentials
Runthefollowingcommandinashell:
curlhttps://raw.githubusercontent.com/googleads/googleads-java-lib/master/examples/admanager_axis/src/main/resources/ads.properties-o~/ads.properties
Openthe~/ads.propertiesfileandpopulatethefollowingfields:
[...]
api.admanager.applicationName=INSERT_APPLICATION_NAME_HERE
api.admanager.jsonKeyFilePath=INSERT_PATH_TO_JSON_KEY_FILE_HERE
api.admanager.networkCode=INSERT_NETWORK_CODE_HERE
[...]
Specifydependencies
Edityourpom.xmlfileandaddthefollowingtothe
dependenciestag.Youcanfindthelatestversionnumberon
Github.
延伸文章資訊
- 1Lesson 1: Google Ad Manager (DFP) Tutorial - YouTube
- 2Get Started | Ad Manager API - Google Developers
Developers can use the Google Ad Manager API to build applications that manage inventory, create ...
- 3Manage Multiple Google Ads Client Accounts with Ease
Previously known as My Client Center (MCC), manager accounts can help you manage multiple account...
- 4Google Ad Manager 如何與Google Ads 搭配運作
Google Ad Manager 是與Google 多媒體廣告聯播網搭配使用的即時交易市集,可用於購買及銷售廣告。廣告客戶想對網際網路上的多媒體廣告出價時,可以選擇這種交易模式。
- 5Ads Settings - Google
Google aims to show you relevant ads based on your interests. Use this tool to select interest ca...