Media Upload Chunked Init - authentication error


#1

Hi,

We’re using chunked upload to add images to tweets for authorized user. And this has worked fine about a month ago when we first made it and tested it, posting tweets w/o images still works fine. But now for some reason media INIT fails with “code”:32,“message”:“Could not authenticate you.”. The code was not changed at all.

In the same code block if I switch the endpoint from https://upload.twitter.com/1.1/media/upload.json to https://api.twitter.com/1.1/statuses/update.json and remove command, media_type, total_bytes from parameters and instead put status with random tweet the authentication works and tweet gets posted.

From what I can see there is no difference in authentication method between media INIT and status/update, so I’m a bit lost as to how to go about fixing this problem. There doesn’t seem to be anything different in documentation from before

Any help would be appreciated, thanks.


#2

I have the same trouble.
There is a “Keep In Mind” section in Upload Media chapter, which has the following:

Because the method uses multipart POST, OAuth is handled differently. POST or query string parameters are not used when calculating an OAuth signature basestring or signature. Only the oauth_* parameters are used.

I made that, But still haven’t resolved this issue.

Please, if you solve this trouble, describe your solution.