Can any one explain briefly about how to use ads api in initial stage and how can i give request to access analytics data


#1

i am new to twitter ads api so any one guide me how to use ads api in initial stage using java and how can i give request to access the data


#2

Hi @manopriyan29! Welcome to the Ads API! :slight_smile:

You can find almost everything on

https://dev.twitter.com/ads/overview

and the rest of the posts on this forum.


#3

You first need an application which your customer must authorize to make requests in his behalf.
That application will first need to be whitelisted for Ads API access, by a Twitter Representative.
Once you have this, you need to implement the login flow (found in the docs) by which you get access tokens for the user (the customer), and then you can make requests to the Ads API to get whatever data you need.
To make valid requests you need to send the “Authorization” request header - you can do this manually (the steps are documented), or use an SDK that does this for you.

Good luck! :slight_smile:


#4

thank you its really helpfull for me and any sdk is available for analytics???


#5

For Java… take a look at

and

https://dev.twitter.com/overview/api/twitter-libraries


#6

thank you so much majoritasdev


#7

You’re welcome, @manopriyan29. :slight_smile:


#8

is there any ads api console tool availabe for testing purpose???


#9

I know about twurl: https://github.com/twitter/twurl.
Also see Setting up Twurl

From https://dev.twitter.com/ads/campaigns:

Twurl is a command-line tool in the spirit of cURL that gracefully handles Twitter OAuth authentication. twurl is a great tool for quickly testing and debugging Ads API (and REST API) functionality. To see the full headers of the request and response, use -t to trace the call, roughly equivalent to cURL’s -v option.