Hi,
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.
Thanks
Karthik
1 Like
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_consumer_key=â2RrxxxxxxxUksSPhâ,
oauth_nonce=â4acxxxxxxxxxxxxx9b49â,
oauth_signature=âxidtzv9OP%2BhkUCYtsZPNo9PIYmQ%3Dâ,
oauth_signature_method=âHMAC-SHA1â, oauth_timestamp=â1451535371â,
oauth_token=â261zzzzzzzzzzzzzaNâ,
oauth_version=â1.0â
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.
Thanks
Karthik
I edited your keys out of the post for privacy, not a good idea to share online 
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 
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 