What's directly Auth?

oauth
api

#1

I want to login so I had try two ways but It did not success
https://api.twitter.com/oauth/authenticate?oauth_token=" + Uri.EscapeDataString(api_key)+"&response_type = code & redirect_uri = " + Uri.EscapeDataString(callback_key) + “&state=xyzbc&show_dialog=true”

https://api.twitter.com/oauth/authenticate?oauth_token=" + Uri.EscapeDataString(api_key).


#2

You cannot directly provide the API key to the oauth/authenticate endpoint. Instead, please read Implementing Sign in with Twitter to understand the basics of OAuth.

tl;dr:

  1. Sign a request to oauth/request_token with your consumer key + secret. Set the oauth_callback parameter here.
  2. Store the received request token + secret in your session.
  3. Send the user to https://api.twitter.com/oauth/authenticate?oauth_token=REQUESTTOKEN.
  4. When the user returns, grab the oauth_verifier from the query string.
  5. Obtain your access token + secret by sending a signed request to oauth/access_token.