blue-sky
blue-sky

Reputation: 53826

Validate twitter username/password

Is there a method on the Twitter api for validating a user ? So I can send a username/password and I will receive a JSON response detailing wether the username/password is valid or not.

Thanks

Upvotes: 0

Views: 539

Answers (2)

abraham
abraham

Reputation: 47843

Twitter supports xAuth which takes a username and password and returns an access token for the user.

However xAuth requires approval from Twitter before your application can use it and they generally only allow it for mobile and desktop accounts. Twitter will also enable it temporarily if you have a legacy BasicAuth app you need to convert to OAuth.

If you decide to go with xAuth keep in mind that you should never store users passwords. Once the authorization is complete immediately discard them.

Upvotes: 1

koool
koool

Reputation: 15517

You can validate using oAuth. you can find various opensource codes for the same. Twitter removed Basic authentication in since Aug 2010

You can take a look here http://apiwiki.twitter.com/w/page/22554657/OAuth-Examples

Hope that helps

Upvotes: 0

Related Questions