Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter API Authenticate vs Authorize

Hi all could you just tell what is the difference between Twitter Authenticate and Authorize

$twitterConnect = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
$twitterToken = $twitterConnect->getRequestToken();

$redirect_url = $twitterConnect->getAuthorizeURL($twitterToken, true); // authenticate 
$redirect_url = $twitterConnect->getAuthorizeURL($twitterToken, false); //authorize
like image 833
coderex Avatar asked Mar 08 '12 05:03

coderex


People also ask

Can I use Twitter API without authentication?

This means that the only requests you can make to a Twitter API must not require an authenticated user. With application-only authentication, you can perform actions such as: Pull user timelines. Access friends and followers of any account.

What is Twitter authorization?

Depending on its permissions, an authorized app may be able to obtain information from and use your account in various ways, such as reading your Tweets, seeing who you follow, updating your profile, posting Tweets on your behalf, accessing your Direct Messages, or seeing your email address.

How does Twitter handle authentication?

Two-factor authentication is an extra layer of security for your Twitter account. Instead of only entering a password to log in, you'll also enter a code or use a security key. This additional step helps make sure that you, and only you, can access your account.


2 Answers

With oauth/authenticate if the user is signed into twitter.com and has previously authorized the application to access their account they will be silently redirected back to the app.

With oauth/authorize the user will see the allow screen regardless if they have previously authorized the app.

like image 50
abraham Avatar answered Sep 20 '22 03:09

abraham


This method differs from GET oauth / authorize in that if the user has already granted the application permission, the redirect will occur without the user having to re-approve the application.

https://dev.twitter.com/oauth/reference/get/oauth/authenticate

Note:

  1. You must enable "Sign in with Twitter" in the application settings to achieve this.
  2. Desktop applications must use this authorize and not authenticate.
like image 21
kehers Avatar answered Sep 23 '22 03:09

kehers