Twitter Ads API Support | Twitter Developer Platform
文章推薦指數: 80 %
The Twitter Ads API connects developers to Twitter's advertising platform. Build solutions to meet the needs of advertisers around the world. Support>TwitterAdsAPI TwitterAdsAPI TheTwitterAdsAPIconnectsdeveloperstoTwitter'sadvertisingplatform.Buildsolutionstomeettheneedsofadvertisersaroundtheworld. Documentation→ APIstatus→ General Errors FAQ Policy Community General Errors FAQ Policy Community Gettingstarted Gettingstarted ReviewourGettingsStarteddocumentationtofindoutwhat’spossibletobuildwiththedifferenttoolsthatareavailableontheAdsAPIplatform,andhowtogettheaccessandinformationthatyouneedtogetstarted. WealsohaveaseriesofQuickLinkstohelpyougetstarted: Hierarchy&Glossary CampaignManagement(APIIndex) Pull campaignmetadata andcreateormanagecampaigns,adgroups,andads. DoGETs,POSTs,orPUTSonCampaigns,Line_items, PromotedTweets,andTweets.NotethatTweetsandtargetingareassociatedwiththeline_item.OnceaTweetisassociatedwithaline_item,apromoted_tweetIDisgenerated. Analytics(APIIndex) UseourActiveEntitiesguide todeterminewhatdatachangedwithinaspecifictimeperiod.Syncendpointshouldbeusedfordatawithinthelast7Days.Asynccanhandleupto90daychunksandsupportssegmentation.Guidehere.Useasyncdatatostorehistoricalmetrics.ViewMetricsandSegmentationforlistofallmetricsandtheirassociatedmetricgroups. Creatives(APIIndex) Upload media,createCards,andcreateTweetsfororganicorpromoteduse.MediaUsePOSTmedia/uploadforimagesorPOSTmedia/upload(chunked)forvideotouploadtoanaccount.AssociatethemediatotheMediaLibrary. CardsWehighlyrecommendyoucreatecardsforyourTweets.VideoWebsiteCards,forexample,isagreatcreativetodriveuserstoawebsitewithavideo. TweetsYoucancreateDraftTweetstotryoutcreatives.ScheduledTweetsaregreatformakingTweetsaheadoftime.CreateorPullTweets.PreviewTweetstopreviewpublished,scheduled,ordraftTweetwithaniframe. TailoredAudiences(APIIndex)-LearnmoreUseourAudienceAPItomakechangestoaudiences.Guidehere.Ensureyouarenormalizingandhashinguserdataproperly. APIstatus APIstatus OurAPIstatuspagecontainsup-to-dateinformationabouttheTwitterAdsAPIandhighlightsongoingandpastincidents. Usingyourkeysandtokens Usingyourkeysandtokens AccessingtheTwitterAdsAPIrequiresasetofcredentialsyoumustpasswitheachAPIrequest.YourcredentialsconsistofasetofkeysandtokensthataregeneratedwhenyoufirstcreateanAppinyourdeveloperdashboard.Ifyoudon’tyethaveadeveloperaccount,youcanapplyforone. AnyusersthathadauthorizedyourAppvia3-legged-oauthpriortoAdsAPIallowlistingwillneedtoreauthorizeyourApptoregenerateuseraccesstokenswiththepermissionstoaccessadvertiserdata.PleasewaitforyourAdsAPIapprovalemailbeforedoingthis. Itisimportantthatyoustoreyourkeysandtokenssecurely.InJanuary2020,westoppedshowingyouraccesstokenandaccesstokensecretinyourTwitterdeveloperAppdashboardbeyondthefirsttimethatthesecredentialsweregenerated. Ifyouloseyourtokens,orbelievethattheyhavebeencompromised,youcanregenerateyourkeysandtokensviatheAppdashboard.Notethatregeneratingyourkeysandtokenswillinvalidateanypreviouskeysandtokensandyoumayneedtorewriteand/orredeployexistingcode. Readmoreaboutstoringyourkeysandtokenssecurelyandauthenticationbestpractice. APIlimitsandcaps APIlimitsandcaps ReviewourdocumentationfortipsonhowtoavoidbeingratelimitedorhowtoknowwhereyourAppisatforagivenratelimit. Allendpointsrequireauthentication,sothereisnoconceptofunauthenticatedcallsandratelimits. Gethelp Gethelp UsetheTwittercommunityforumtogetsupportfromaglobalnetworkofdevelopersandTwitteremployees. TwitterCommunityForum IfyoubelongtoaTwitterOfficialPartnerorganization,pleasecontactyourPartnerManagerdirectlyfortechnicalsupportoptions. Errorcodesandresponses Errorcodesandresponses Successfulresponsesareindicatedwitha200-seriesHTTPcodeandaJSON-basedpayloadcontainingtheobject(s)requested,created,modified,ordeletedalongwithanexpressionoftheserver’sinterpretationofyourrequest. Errorresponsesareservedwithanon-200-seriesHTTPcode.Differenterrorcodesindicatedifferentreasonsforanerror. APIstatuscodes APIstatuscodes TheTwitterAPIattemptstoreturnappropriateHTTPstatuscodesforeveryrequest. Code Text Description 200 OK Success! 304 NotModified Therewasnonewdatatoreturn. 400 BadRequest Therequestwasinvalidorcannotbeotherwiseserved.Anaccompanyingerrormessagewillexplainfurther.Requestswithoutauthenticationareconsideredinvalidandwillyieldthisresponse. 401 Unauthorized Therewasaproblemauthenticatingyourrequest.Thiscouldbeduetomissingorincorrectauthenticationcredentials.Thismayalsobereturnedinotherundefinedcircumstances. 403 Forbidden Therequestisunderstood,butithasbeenrefusedoraccessisnotallowed.Anaccompanyingerrormessagewillexplainwhy.Thiscodeisusedwhenrequestsarebeingdenieddueto updatelimits. 404 NotFound TheURIrequestedisinvalidortheresourcerequested,suchasauser,doesnotexist. 406 NotAcceptable Returnedwhenaninvalidformatisspecifiedintherequest. 410 Gone Thisresourceisgone.UsedtoindicatethatanAPIendpointhasbeenturnedoffandisnolongeravailable. 422 UnprocessableEntity Returnedwhenthedataisunabletobeprocessed(forexample,ifanimageuploadedto POSTaccount/update_profile_banner isnotvalid,ortheJSONbodyofarequestisbadly-formed). 429 TooManyRequests ReturnedwhenarequestcannotbeservedduetotheApp'sratelimithavingbeenexhaustedfortheresource.See RateLimiting. 500 InternalServerError Somethingisbroken.Thisisusuallyatemporaryerror,forexampleinahighloadsituationorifanendpointistemporarilyhavingissues.Checkthe TwitterAPIstatuspage orthe developercommunityforum incaseothersarehavingsimilarissues,ortryagainlater. 502 BadGateway Twitterisdown,orbeingupgraded. 503 ServiceUnavailable TheTwitterserversareup,butoverloadedwithrequests.Tryagainlater. 504 Gatewaytimeout TheTwitterserversareup,buttherequestcouldn’tbeservicedduetosomefailurewithintheinternalstack.Tryagainlater. Troubleshootingerrorcodes Troubleshootingerrorcodes TheAdsAPIuseserrorenumsvserrorcodesfoundinTwitterLabsandotherTwitterAPIs.ForafulllistoferrorspleaseseetheErrorCodesandResponsesdocumentation. IsmyAppontheallowlistfortheTwitterAdsAPI? IsmyAppontheallowlistfortheTwitterAdsAPI? Westrivetoreviewapplicationswithin14daysofsubmission.Youwillreceiveaconfirmationemailwithyourapplicationstatuswithinthistime.Ifithasbeenmorethan14days,youareunabletofindanapprovalorrejectionemail,andyouareunsureaboutyourAppstatus,pleasereachoutviaadsapi-program@twitter.com.PleaseincludeyourAppIDinyourinquiry. WhyarecampaignIDsdifferentintheads.twitter.comUIcomparedtotheAPI? WhyarecampaignIDsdifferentintheads.twitter.comUIcomparedtotheAPI? TheUIisinbase-10whentheAPIisinbase-36.Readmore. Questionstillnotanswered Questionstillnotanswered SearchtheTwittercommunityforumtobrowseanswerstootherfrequentlyaskedquestions. Reviewourguideonhowtogetyourquestionansweredbeforeyoupostanewquestion. TwitterCommunityForum PleaseviewtheAdsAPIAgreement. ByagreeingtotheTwitterAdsProductsandServicesAgreement,youagreetotheTwitterPrivacyPolicy,TermsofService,DeveloperAgreementandPolicy,TrademarkandBrandGuidelines,andapplicableTwitterMasterServicesAgreement. YoualsoagreetotheTwitterAdspolicies,includingthoseforConversionTrackingandTailoredAudiences,andTwitter'sDataProcessingAddendum. TheTwittercommunityforumisavailableforyoutoasktechnicalquestionsabouttheTwitterdeveloperplatform.ThisisadiscussionsforumwhereyouwillfindquestionsbyotherdevelopersandtechnicalinformationonavarietyoftopicsrelatedtousingtheTwitterAdsAPI. Weencourageyoutojointheconversationbyrespondingtoquestionsandengaginginconversationsonourforum.Twitteremployeesarealsotheretoprovidesupport. Beforepostinganewquestion,pleasereviewthisguide designedtohelpyougetanswersquickly. TwitterCommunityForum ByusingTwitter’sservicesyouagreetoourCookiesUse.Weusecookiesforpurposesincludinganalytics,personalisation,andads. OK ThispageandcertainotherTwittersitesplaceandreadthirdpartycookiesonyourbrowserthatareusedfornon-essentialpurposesincludingtargetingofads. Throughthesecookies,Google,LinkedInandDemandbasecollectpersonaldataaboutyoufortheirownpurposes. Learnmore. Accept Decline
延伸文章資訊
- 1Authentication overview | Docs | Twitter Developer Platform
Your App's API Keys and Bearer Token, as well as your personal Access Token and Access Token Secr...
- 2Accessing Ads accounts | Docs | Twitter Developer Platform
The authenticated Twitter user account making requests on the API is referred to as the 'current ...
- 3Authenticated User Access | Docs | Twitter Developer Platform
Retrieve the permissions of the currently authenticated user (access_token) as they relate to the...
- 4Making Authenticated Requests | Docs - Twitter Developer
The Twitter Ads API uses signed HTTPS requests to validate an application's identity and also obt...
- 5Twitter Ads API Support | Twitter Developer Platform
The Twitter Ads API connects developers to Twitter's advertising platform. Build solutions to mee...