Hey episod, thanks for the quick response. I’ve been doing exactly that. I even plugged in Twitter’s example values in to my Autorization header builder & signature generator, and the results are generated just fine–all hashed values match, exact ordering and etc. I even have used their examples to unit test my code. However, when I plugin my values, I keep getting a 401 error.
Wherever it says X, it means it was supplied to me through the dev app settings center.
For example, here is what I am sending
{UR: https://api.twitter.com/1.1/statuses/update.json&status=hi}
METHOD = “POST”
{Authorization: OAuth oauth_version=“1.0”, oauth_signature_method=“HMAC-SHA1”, oauth_consumer_key=“X”, oauth_token=“X”, oauth_nonce=“HPjNvUERs5v%2FU1MEKR7CLX3%2F%2BzI%3D”, oauth_timestamp=“1376959602”, oauth_signature=“js%2BSNFtVBdVSg%2BK7SnrkRHXTUAA%3D”}
OAuth parameters used to generate the authorization header
{[oauth_version, 1.0]}
{[oauth_signature_method, HMAC-SHA1]}
{[oauth_consumer_key, X]}
{[oauth_token, X]}
{[oauth_nonce, HPjNvUERs5v/U1MEKR7CLX3/+zI=]}
{[oauth_timestamp, 1376959602]}
{[oauth_signature, js+SNFtVBdVSg+K7SnrkRHXTUAA=]}
parameters used in signature generation
{[oauth_consumer_key, X]}
{[oauth_nonce, %2Fq5bhC205nD%2B90sWiv83m04bl%2Bw%3D]}
{[oauth_signature_method, HMAC-SHA1]}
{[oauth_timestamp, 1376961624]}
{[oauth_token, X]}
{[oauth_version, 1.0]}
{[status, hi]}
The keys were first sorted and then the string was generated. After all that, I get a 401. Is there any way to find out what was missing?
I’m getting desperate. Again, the examples in the docs work exactly as intended when I pass them through my code but I for some reason get a 401.
Any ideas on how to proceed from here?