Getting Started | Docs | Twitter Developer Platform

文章推薦指數: 80 %
投票人數:10人

How to get access to the Ads API · Step one: Signup for a developer account · Step two: Save your App's key and tokens and keep them secure · Step three: Apply for ... GettingStarted HowtogetaccesstotheAdsAPI Signupfora developeraccount Createa developerApp andsecureyourtoken Request accesstotheAdsAPI Note:  IfyouarealreadybuildingontheTwitterDeveloperPlatformandhaveadeveloperaccount,skiptostepthree. Stepone:Signupforadeveloperaccount TomakearequesttoanyofTwitter'sAPIproducts,youmustfirstsignupforadeveloperaccount.Withinthedeveloperportal, createaProjectanddeveloperApp.ThiswillprovideyouasetofcredentialsthatyouwillusetoauthenticateallrequeststotheAPI.  Signupforadeveloperaccount Steptwo:SaveyourApp'skeyandtokensandkeepthemsecure WithinyourdeveloperApp,youwillbeprovidedasetofAPIKeys(alsoknownasConsumerKeys).YouwillalsohavethechancetogenerateasetofAccessTokensthatcanbeusedtomakerequestsonbehalfofyourpersonalTwitteraccount,andaBearerTokenthatcanbeusedtoauthenticateendpointsthatrequireOAuth2.0BearerToken.Asthesekeysandtokensdonotexpireunlessregenerated,wesuggestcreatingenvironmentvariables,orusingasecurepasswordmanager. PleasealsotakenoteofyourAppID,whichcanbefoundintheURLofyourAppdetails.ThiswillmakeiteasiertorequestaccesstotheAdsAPIinthenextstep. Pleasenote:Yourkeysandtokenswillonlydisplayonceinthedeveloperportal,soitisimportantthatyoustorethesecredentialsinyourpasswordmanagementsystemassoonasyougeneratethem. Ifyoumisplaceorforgetthekeysandtokens,youwillneedtoregeneratethem,whichcreatesnewkeysandtokens,andinvalidatestheoldones.Thismeansthatyouwillhavetoupdateanyintegrationsthatyoumayhavesetupwithyourpriorcredentials.UntilJanuary2021,youcanretrieveanApp’skeyandtokensthroughthedeveloperportal. Learnmoreaboutourauthenticationbestpractices.  Stepthree:Apply foraccesstotheAdsAPI AtthispointyouwillhavebasicaccesstotheTwitterAPI,butnotspecificTwitterAdsAPIfunctionality.Next,youwillneedtorequestaccessandbeapproved. ApplyforAdsAPIAccess Accesstiers Tostartyouwillbegranted“Limited”accesstotheAdsAPIwithaninitiallimitoffiveTwitteruserswhocanuseyourapp.AtthistimeyourappisabletomakerequeststotheAdsAPI. AsyoudevelopyourintegrationwiththeAdsAPIyoumayneedtoincreaseyourtokenlimit.Forinformationonhowtoincreasetheselimitsseetheincreasingaccessguide. Limited Thisentry-levelLimitedlicenseprovidescompaniesaccesstoAdsAPIendpointstodeveloptheirtooltocompletion.Limited-levelaccessdeveloperAppsareinitiallylimitedtofiveOAuthtokens. Advanced Thenextlevelup.Advancedaccessindicatesadeveloperhasproventheirconceptinlivepilotcampaigns.OAuthtokenlimitsareliftedonthedeveloperApptoallowbusinesstoscale. Makeyourfirstrequest TotestyouraccesstotheAdsAPImakearequesttotheGETaccountsendpoint.Thisendpointwillreturntheadaccountsthecurrentlyauthorizeduserhasaccessto.UsetheadaccountIDsfromthisrequestinsubsequentAPIrequeststoreadandwritedataforaspecificadaccount.UsingTwurlonthecommandlinetherequestwouldlooklikethefollowing. ExampleRequest twurl-Hads-api.twitter.com"/10/accounts" Codecopiedtoclipboard ExampleResponse { "request":{ "params":{} }, "data":{ "name":"Furni", "business_name":null, "timezone":"America/Los_Angeles", "timezone_switch_at":"2016-04-06T07:00:00Z", "id":"18ce54ayf0z", "created_at":"2016-04-07T14:40:15Z", "salt":"b88939e5cabbca720159cb3659d73c06", "updated_at":"2017-02-08T08:49:53Z", "business_id":null, "approval_status":"ACCEPTED", "deleted":false } }   Upnext... ReadthroughtheAdsAPIdocumentationfundamentalssuchasversioningandhierarchy. CheckoutthevariousAdsAPItools&librariestoaidyouinyourAdsAPIintegration. UnderstandthestepstoincreaseAdsAPIaccess. Familiarizeyourselfwithavailablesupportresources. Follow@AdsAPIforliveupdatesonAPIchanges,serviceissuesandenhancementstoTwitterpromotedproducts. ByusingTwitter’sservicesyouagreetoourCookiesUse.Weusecookiesforpurposesincludinganalytics,personalisation,andads. OK ThispageandcertainotherTwittersitesplaceandreadthirdpartycookiesonyourbrowserthatareusedfornon-essentialpurposesincludingtargetingofads. Throughthesecookies,Google,LinkedInandDemandbasecollectpersonaldataaboutyoufortheirownpurposes. Learnmore. Accept Decline



請為這篇文章評分?