I came across the error “Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.” as well as other errors, but this one seemed to be the most vague one I could not figure out.
After many hours of consulting google, documentation, https://dev.twitter.com/discussions/204, as well as many android sdks for twitter, I found that simply switching out my consumer key and consumer secret key to someone else’s works (XXXX and XXXXX respectively).
Can someone provide some help and insight as to why my consumer key and consumer secret key was not working? This has been a very frustrating experience. Here are my app settings.
Access level Read and write
About the application permission model
Consumer key XXXXX
Consumer secret XXXXXXX
Request token URL https://api.twitter.com/oauth/request_token
Authorize URL https://api.twitter.com/oauth/authorize
Access token URL https://api.twitter.com/oauth/access_token
Callback URL None
Sign in with Twitter Yes