I have an application that uses v.1 of API to send updates to Twitter without problem. I have been testing the switch to v.1.1 API authentication for the application using the same Twitter account. The authentication headers, etc that it generates look correct to me, but I cannot get past the HTTP error response " The remote server returned an error: (401) Unauthorized". I am following instructions in Twitter’s OAuth documentation for “Authorizing a Request”, “Creating a Signature”, and “Percent encoding parameters” instructions online. But the result is still the same: 401 error.
Below is the information my application generates to send an update to my Twitter account (according to the documents mentioned above). The tokens and consumer secrets have been replaced with “X”. I’d appreciate help from anyone that sees anything incorrect or questionable with the content or structure/length. Any recommendations of what else to try in my testing would be appreciated as well. Many Thanks.
Parameter String:
include_entities=true&oauth_consumer_key=XXXXXXXXXXXXXXXXXXXXX&oauth_nonce=YjZ0fAjmzdMoUfoeC6MM1nSDIvEBIbMxZGcT69z7kDU0&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1362058655&oauth_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&oauth_version=1.0&status=This%20is%20only%20a%20test.%20No%20action%20required%20at%20this%20time.%20This%20is%20a%20test.
Signature String:
POST&https%3A%2F%2Fapi.twitter.com%2F1.1%2Fstatuses%2Fupdate.json&include_entities%3Dtrue%26oauth_consumer_key%3DXXXXXXXXXXXXXXXXXXXXX%26oauth_nonce%3DYjZ0fAjmzdMoUfoeC6MM1nSDIvEBIbMxZGcT69z7kDU0%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1362058655%26oauth_token%3DXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%26oauth_version%3D1.0%26status%3DThis%2520is%2520only%2520a%2520test.%2520No%2520action%2520required%2520at%2520this%2520time.%2520This%2520is%2520a%2520test.
Signing key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Signature: 0HHEcJTqxLuH+iuf4EuczGoP1sw=
Authorization header : OAuth oauth_consumer_key="XXXXXXXXXXXXXXXXXXXXX", oauth_nonce="YjZ0fAjmzdMoUfoeC6MM1nSDIvEBIbMxZGcT69z7kDU0", oauth_signature="lQSmkWJfrRCOoI11HwRI1iIRPcg%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1362058655", oauth_token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", oauth_version="1.0"