Twitter Ads API curl commands

ads
campaign-management

#1

Hi,

Can anyone help me with the curl commands? I am trying to make a Java application that would be able to retrieve campaign data. I have tried to search from documents that what would be an example curl commands (I don’t want to use twurl because it won’t help me to see what does it need to make a for example curl request) for getting campaign data. In documents, it only shows the example requests but what if I make a request via curl or postman, what does it need? :frowning: I have been stuck for many days now.


#2

Hi @madtrix_io ,

Which endpoint are you exactly asking for?

e.g., https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/campaigns

Well, basically twurl is designed for a wrapper of curl, so the command should be very similar to what you expect for curl. For instance,

  • twurl
$ twurl -X GET -H 'ads-api.twitter.com' '/4/accounts/:account_id/campaigns'
  • curl
$ curl -X GET 'https://ads-api.twitter.com/4/accounts/:account_id/campaigns'

Best,
Shohei