Seems Twitter’s own twurl command line utility doesn’t support the new media/metadata/create endpoint yet either. I’m getting “401 Authorization Required” and “32 Could not authenticate you.” as response.
My guess is that it’s caused by twurl (or maybe the Ruby OAuth library it uses) automatically setting the Content-Type header to “application/x-www-form-urlencoded” instead of “application/json” as described in the API documentation. Adding it with an extra -A command line option doesn’t help.
Anyone here know enough Ruby to make twurl work correctly? I’d like to do my part to make images more accessible, but Lua is my language of choice these days, and this looks too complex for a quick hack.