← home
Ryan Barrett

thanks for this! sounds like it’s specific to update_with_media, since it’s multipart, ie it doesn’t apply to other API POST requests? I use tweepy, but I’ll still keep an eye out when I get to POSSEing pictures.

Kyle Mahan

Signing Twitter API update_with_media requests

When a post on this site includes a photo, I have started using the https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media endpoint to upload the photo to Twitter as well (https://twitter.com/kyle_wm/status/445435592004743168). There is one quirk with the way the POST is signed — only the oauth_ parameters are used when calculating the oauth signature. This is well-documented https://dev.twitter.com/docs/uploading-media Because the method uses multipart POST, OAuth is handled a little ...
Kyle Mahan

I’ll be interested to know what happens with Tweepy. I glanced at its code and didn’t see any obvious special case handling, so if it works they are doing something more elegant than I am :)