Obtaining a PIN for REST API calls from an IoT device

oauth
login
pin

#1

I cannot obtain a PIN with https://api.twitter.com/oauth/request_token

Instead I keep getting that:
oauth_token=_xK1…xU&oauth_token_secret=0og…PV&oauth_callback_confirmed=true

The IoT device I am building does not have human to machine interface so PIN authentication is the only option for my flow.

What might I be doing wrong?


Displaying URL to user for PIN base authentication
#2

That’s expected. You then have move to the next step with GET oauth/authorize where you visit a Twitter URL with the oauth_token return from GET oauth/request_token in a web browser and authorize with the user you want access granted from. Once the user grants access a PIN will be displayed in the browser which you will then need for the final step listed in the PIN flow.


#3

Hi Abraham,

For every time we need to copy the url and past in the device to process furthur. In this case we cannot schedule a job where we need to develop an application to download data from TwitterAds api. Is there any process where we can get pin automatically as we are developing C# console application where we don’t have option of redirection(even we have we need to authorize daily at job run time which is meaningless).

I tried with Tweetinvi and Tweetsharp sdk but they are meant to work for Twitter Public API like users, retweets, tweets etc… but not for TwitterAds api. If you know any Nuget or sdk which we can use download data is appreciable.

Thanks
Marala