'Unauthorized' error on POSTing a status with special character and colon

api

#1

I’m having trouble getting my app to POST status updates to Twitter through the API. We authenticate and POST fine in most circumstances, except when the message content contains BOTH a character with char code 128 or higher AND a one of these characters :!()*
In the failure case, twitter response with “Unauthorized”.

Examples work:
Hello world :cookie:
Hello world :

Example doesn’t work:
Hello world: :cookie:

I’m confident that our percent encoding is correct because it works without the colon and our encoding matches the examples given in Twitters documentation (at https://dev.twitter.com/oauth/overview/percent-encoding-parameters)

Are !()*: reserved characters for the twitter API? Any suggestions would be helpful.


#2

Also, can anyone else reproduce this, or is it just me?


#3

Appears to work fine in Tweetdeck and my personal system. Mine sharing some relevant code, it might have some insight on the error.


#4

FYI, my issues were resolved by rewriting my HTTP POST based on this Stack Overflow Answer
It adds the tweet content in a stream after the POST instead of in the headers. Not sure why this fixed the issue, but it did.