skip to Main Content

How can I sign into Twitter with username and password programmatically using .NET? I don’t want to use the “Sign in with Twitter” button because I make a web API controller. Also I don’t want to use oauth_consumer_key/secret because in my application it must be possible to login multiple users with their user/password.

2

Answers


  1. All requests to the Twitter API must use the OAuth authentication method. You cannot sign into your Twitter account via the Twitter API with username and password.

    Basic Authentication (username & password) was disabled in 2010.

    Login or Signup to reply.
  2. @DWRoelands is correct, Twitter has disabled this feature. You will need to get in contact privately with them if you want to have access to it. But to be honest they no longer grant much of them, you will need a very strong case.

    Another solution would be to get the html page and dynamically fill the fields and submit the authentication form. At this point you’ll be able to get the verifier code back by getting the div containing the code by id.

    I have worked with WebApi and Twitter oauth without any problem. What problem do you encounter?

    Finally you can have multiple accounts authenticated via oauth too, you don’t need the username password for this.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search