I’m stumped why I I keep getting a 401 when trying to use “/1.1/media/upload.json” when the same authorication header works for “/1.1/statuses/home_timeline.json.”
Th header is comprised of:
- oauth_version
- oauth_consumer_key
- oauth_token
- oauth_timestamp
- oauth_nonce
- oauth_signature_method
My headers look like:
"Authorization": 'OAuth oauth_consumer_key="' + oauth_consumer_key + '", oauth_nonce=' + nonce + ', oauth_signature=' + encodedSig + ', oauth_signature_method="HMAC-SHA1", oauth_timestamp=' + timestamp + ',oauth_token="' + oauth_token + '", oauth_version="1.0"'
'Content-Transfer-Encoding': 'base64'
'Content-Type': 'application/x-www-form-urlencoded'
The only value in the body is the “media_data”: “XXXXXXXXX”. Can anyone post what the proper header is or code on how to upload a Base64 encoded string? I’m it this way because I’m on “Parse.com” and they don’t support multipart form posts.