I have also got this 401 error when I added the oauth_callback to the authorization header. the callback URL is correctly encoded. When I remove the oauth_callback url it working perfectly.
For your reference following is my authorization header;
OAuth oauth_nonce=“f4809773431b4974830561c523d5ad2e”,oauth_callback=“http%3A%2F%2Flocalhost%2FTestTwitterIntegrationApplication”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1444802868”,oauth_consumer_key=“XXXXXXXYYYYYYYZZZZZ”,oauth_signature=“bAdGqfCjoBekpqv1%2FdZVQsIxSi4%3D”,oauth_version=“1.0”
And I have added oauth_callback to the signature base string also.
I have generated the authorization header using Twitter’s OAuth Tool, in that it does not mention any oauth_callback URL parameter(I have given a callback URL in the application settings hoping it will appear, but it doesn’t).
Can anyone help me to resolve this please ?.
Thanks.