Getting authorization to send a post request (video upload)

oauth
media-upload
java

#1

I want to send a post request to the https://upload.twitter.com/1.1/media/upload.json to post a video from my java web application to twitter. I have all the necessary keys to get the authorization but I don’t know what URL should I use? For example, to get the request token we use https://api.twitter.com/oauth/request_token. So for the authorization, can I use https://api.twitter.com/oauth/authorize? Or have I to send the oauth parameters only to the https://upload.twitter.com/1.1/media/upload.json every time with the INIT, APPEND and the FINALIZE command?
Thanks!


#2

Hello @andypiper, have you please any idea about that? Thanks!


#3

Information about our OAuth implementation can be found here, with additional comments on the requirements for media here. Rather than trying to sign everything yourself I’d strongly recommend finding a client library that makes this easier. You can see the example upload traces in the Uploading Media guide (using twurl). By running twurl yourself with the -t parameter you’ll enable more detailed tracing which would output the OAuth headers.