POST tweet returns error code 32



I have created an embedded application which can tweet messages using POST.Till recently i had the application to tweet successfully.All of a sudden,the same application returns an error code 32 which reads “message could not authenticate you”.
I am sure that i did not exceed the rate limit.
Application token keys and consumer keys are verified.
What could have gone wrong?
Appreciate your support.



Is there any chance that the time on your system has drifted? OAuth relies on a close time sync between client and server so this can cause error 32 in some cases.


Hi Andy,

Thanks for your response.

I verified the timestamp.Assuming it was not correct,the server would return an error code 135 which reads “timestamp out of bounds”.

The embedded device pulls the current UTC time from the web and frames it an OAuth header.So,i am sure the timestamp is reasonably accurate.Of course,the time will be off by few seconds since the embedded device has to pull the time stamp and send a request to the server.

I noticed one discrepancy in OAuth header.The following Authorization header is reported by the OAuth tool:

Authorization: OAuth
oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1451535371”,

The “Authorization” header framed by the embedded device is little different.The “oauth_signature” is framed after “oauth_version”

Should the order in which header is framed match with that generated by the OAuth tool?
If so,i am surprised how it worked for me till recently with an out of order “Authorization” header.



I edited your keys out of the post for privacy, not a good idea to share online :slightly_smiling:

I don’t believe the order matters in this case but I might be wrong. As you say, I’d be surprised if that was the issue given that this has been working until recently.

Did you try regenerating / replacing the keys?


Thanks for the editing the keys :slightly_smiling:
I did re-generate the keys.But like you mentioned earlier, i figured timestamp was the culprit.
In addition,the actual tweet message buffer got corrupted.I am using a microcontroller for this application by the way.
Thanks for your support.
Happy new year :slight_smile: