PHP Classes
elePHPant
Icontem

PHP OAuth Library API: Authorize and access APIs using OAuth

Recommend this page to a friend!

  Author Author  
Picture of Manuel Lemos
Name: Manuel Lemos <contact>
Classes: 38 packages by
Country: Portugal Portugal
Age: 47
All time rank: 1
Week rank: 1 Equal


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can authorize the access of users to an API using the OAuth protocol.

It abstracts OAuth 1.0, 1.0a and 2.0 in the same class, so you can use the same code to authorize the access on behalf of the current user any API that supports any version of the OAuth protocol.

It works on Linux, Windows and any other platform without the PECL PHP OAuth extension.

The access tokens are stored by default in session variables, but there are sub-classes specialized in storing the tokens in database tables, files or cookies.

It provides built-in support to several popular OAuth servers, so you do not have to configure the class manually with all OAuth server specific details.

Currently it provides built-in support for many OAuth servers. Every other OAuth server is supported setting end point URLs and other parameters using specific class variables. Additional servers may be supported without changing the main class by configuring a separate JSON configuration file.

The class can also send requests to API using the previously obtained OAuth access token.

It also supports 2 legged API access, so it can send signed API requests that do not require user authorization.

For mobile or other applications that the user cannot be redirected back to the client application site, this class supports pin based authorization either using OAuth 1.0a or OAuth 2.0.

It can as well obtain access tokens for specific users given their user name and password or using client credentials. It supports OAuth 2.0 authorization flows authorization_code, password and client_credentials.

For servers that support offline access like Google and Box.net, the class can also verify if the access token expired and refresh the token value before sending an API call, without requiring the user presence.

For servers that support re-authentication like Facebook, the class may also force the user to enter this application password on the authorization page.

Here is the list of OAuth servers that have built-in support:

- 37Signals
- Amazon
- AOL
- Bitbucket
- Bit.ly
- Box.net
- Buffer
- Copy
- Dailymotion
- Discogs
- Disqus
- Dropbox with OAuth 1.0 and 2.0
- Etsy
- Eventful
- Facebook
- Fitbit with OAuth 1.0a and 2.0
- Flickr
- Foursquare
- github
- Google with OAuth 1.0a and OAuth 2.0
- imgur
- Infusionsoft
- Intuit (Quickbooks)
- Instagram
- Jawbone
- LinkedIn with OAuth 1.0a and OAuth 2.0
- mail.ru
- MailChimp
- Mavenlink
- Meetup
- Microsoft
- Misfit Wearables
- oDesk
- Paypal and Paypal client_credentials application only
- Rdio
- Reddit
- RightSignature
- RunKeeper
- Salesforce
- Scoop.it
- StockTwits
- SurveyMonkey
- TeamViewer
- Tumblr
- Twitter with OAuth 1.0a and 2.0 for client_credentials authorization
- Uber
- Vimeo
- VK
- Withings
- Wordpress
- Xero
- XING
- Yahoo
- Yandex

  Classes of Manuel Lemos  >  PHP OAuth Library API  >  Download Download .zip .tar.gz  >  Support forum Support forum (357)  >  Blog Blog (9)  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP OAuth Library API
Base name: oauth-api
Description: Authorize and access APIs using OAuth
Version: 1.0.84
PHP version: 5.2
License: BSD License
All time users: 19939 users
All time rank: 33
Week users: 94 users
Week rank: 6 Up
 
  Groups   Screenshots Screenshots   Rate classes User ratings  
  Dependencies   Dependents   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image User Management User records, authentication and session handling View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes

  Files folder image Screenshots  
php-oauth-api.png
File Role Description
Accessible without login Image file php-oauth-api.png Screen Example of information retrieved from user account after logging in Facebook using OAuth


  Recommendations  

What is the best PHP youtube api class?
Get subscribers

PHP Class for Social login
Login using credentials from a social site such as Facebook

PHP OAuth API for Etsy
Library to handle OAuth 1.0 API

Integrate wit ai API
PHP class to integrate wit ai API

Fitbit Subscription API
Subscribing to Fitbit events and verify subscriber

How to login with Facebook?
Facebook login using OAuth 2.0

What is the best PHP flickr uploading class?
PHP uploader class for Flickr

What is the best PHP oauth class?
oAuth 2

Get latest Facebook posts on timeline
I need to get the last 5 facebook posts

Facebook auto publish without Facebook app
Automatically post in Facebook Simulating Human

What is the best PHP twitter auto post class?
want to auto post status from my site

What is the best PHP facebook login class?
Would like some example of usage Facebook login

Google Drive file management
Handle files using Google Drive API

Import Google contacts
Social login works but not import contacts

Google Docs using PHP
Interact with Google Docs

Developing an API with using Google and Facebook API
Create an own API works together with other social network APIs

Linkedin login
I need to create an app with login via linkedin

What is the best PHP facebook login class?
Facebook login to my website

Meetup OAuth connection code using PHP
I am getting an error trying to get property of non-object

Retrieve Twitter user profile info
Integrate Twitter in my application

Google custom search engine using the API
Google Custom Search engine using the API in PHP


  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (94%) Good (89%) Good (84%) Good (87%) - - Sufficient (73%) 154
Month: Not yet rated by the users

  Packages needed by this class  
Class DownloadWhy it is needed Dependency
PHP HTTP protocol client Download .zip .tar.gz Send HTTP request to OAuth servers Required

  Other classes that need this package  
Class Why it is needed Dependency
PHP Twitter Feed Needed to obtain Twitter access tokens and call its API Required
PHP Webmaster Tools API Authorize the access to the Webmaster Tools API on behalf of a given user Required

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Plain text file oauth_client.php Class OAuth client class
Accessible without login HTML file oauth_client_class.html Doc. Documentation of the OAuth client class
Plain text file cookie_oauth_client.php Class OAuth client sub-class sor storing and retrieving tokens in encrypted
Plain text file database_oauth_client.php Class OAuth client sub-class for storing and retrieving tokens in databases
Accessible without login Plain text file enter_pin.php Aux. Helper script to let the user enter the authorization pin
Accessible without login Plain text file file_login_with_google.php Example Example of logging in with Google using OAuth and storing the access token in a file
Plain text file file_oauth_client.php Class OAuth client sub-class for storing and retrieving tokens in files
Accessible without login Plain text file LICENSE Lic. License of the class
Accessible without login Plain text file login_check_with_facebook.php Example Example of checking if the user has authorized Facebook API access without redirecting to the authorization page
Accessible without login Plain text file login_with_37signals.php Example Example of logging in with 37Signals using OAuth
Accessible without login Plain text file login_with_amazon.php Example Example of logging in with Amazon using OAuth
Accessible without login Plain text file login_with_aol.php Example Example of logging in with AOL using OAuth
Accessible without login Plain text file login_with_bitbucket.php Example Example of logging in with Bitbucket using OAuth
Accessible without login Plain text file login_with_bitly.php Example Example of logging in Bitly using OAuth
Accessible without login Plain text file login_with_box.php Example Example of logging in with Box.net using OAuth
Accessible without login Plain text file login_with_buffer.php Example Example of logging in with Buffer using OAuth
Accessible without login Plain text file login_with_copy.php Example Example of logging in with Copy using OAuth
Accessible without login Plain text file login_with_dailymotion.php Example Example of logging in with Dailymotion using OAuth
Accessible without login Plain text file login_with_discogs.php Example Example of logging in with Discogs using OAuth
Accessible without login Plain text file login_with_disqus.php Example Example of logging in with Disqus using OAuth
Accessible without login Plain text file login_with_dropbox.php Example Example of logging in with Dropbox using OAuth
Accessible without login Plain text file login_with_etsy.php Example Example of logging in with Etsy using OAuth
Accessible without login Plain text file login_with_eventful.php Example Example of logging in with Eventful using OAuth
Accessible without login Plain text file login_with_facebook.php Example Example of logging in with Facebook using OAuth
Accessible without login Plain text file login_with_fitbit.php Example Example of logging in with Fitbit using OAuth
Accessible without login Plain text file login_with_fitbit2.php Example Example of logging in with Fitbit using OAuth 2.0
Accessible without login Plain text file login_with_flickr.php Example Example of logging in with Flickr using OAuth
Accessible without login Plain text file login_with_foursquare.php Example Example of logging in with Foursquare using OAuth
Accessible without login Plain text file login_with_garmin.php Example Example of logging in with Garmin using OAuth
Accessible without login Plain text file login_with_github.php Example Example of logging in with github using OAuth
Accessible without login Plain text file login_with_google.php Example Example of logging in with Google using OAuth
Accessible without login Plain text file login_with_imgur.php Example Example of logging in with imgur using OAuth
Accessible without login Plain text file login_with_infusionsoft.php Example Example of logging in with Infusionsoft using OAuth
Accessible without login Plain text file login_with_instagram.php Example Example of logging in with Instagram using OAuth
Accessible without login Plain text file login_with_intuit.php Example Example of loggin in with Intuit (Quickbooks) using OAuth
Accessible without login Plain text file login_with_jawbone.php Example Example of logging in Jawbone using OAuth
Accessible without login Plain text file login_with_linkedin.php Example Example logging in with LinkedIn using OAuth
Accessible without login Plain text file login_with_linkedin2.php Example Example logging in with LinkedIn using OAuth 2.0
Accessible without login Plain text file login_with_mail.ru.php Example Example of logging in with mail.ru using OAuth
Accessible without login Plain text file login_with_mailchimp.php Example Example logging in with MailChimp
Accessible without login Plain text file login_with_mavenlink.php Example Example of logging in Mavenlink using OAuth
Accessible without login Plain text file login_with_meetup.php Example Example of logging in with Meetup using OAuth
Accessible without login Plain text file login_with_microsoft.php Example Example of logging in with Microsoft Hotmail or Windows Live account
Accessible without login Plain text file login_with_misfit.php Example Example of logging in with Misfit using OAuth
Accessible without login Plain text file login_with_odesk.php Example Example of logging in oDesk using OAuth
Accessible without login Plain text file login_with_paypal.php Example Example of logging in with Paypal using OAuth
Accessible without login Plain text file login_with_rdio.php Example Example of logging in with Rdio using OAuth
Accessible without login Plain text file login_with_reddit.php Example Example of logging in with Reddit using OAuth
Accessible without login Plain text file login_with_rightsignature.php Example Example of logging in with RightSignature using OAuth
Accessible without login Plain text file login_with_runkeeper.php Example Example of logging in RunKeeper using OAuth
Accessible without login Plain text file login_with_salesforce.php Example Example of logging in with Salesforce using OAuth
Accessible without login Plain text file login_with_scoopit.php Example Example of logging in with Scoop.it using OAuth
Accessible without login Plain text file login_with_stocktwits.php Example Example of logging in with StockTwits using OAuth
Accessible without login Plain text file login_with_surveymonkey.php Example Example of logging in with SurveyMonkey using OAuth
Accessible without login Plain text file login_with_teamviewer.php Example Example of logging in with TeamViewer using OAuth
Accessible without login Plain text file login_with_tumblr.php Example Example of logging in with Tumblr using OAuth
Accessible without login Plain text file login_with_twitter.php Example Example of logging in with Twitter using OAuth
Accessible without login Plain text file login_with_twitter2.php Example Example of how to implement application-only access to Twitter API using OAuth 2 client_credentials grant_type
Accessible without login Plain text file login_with_uber.php Example Example of logging in with Uber using OAuth
Accessible without login Plain text file login_with_vimeo.php Example Example of logging in with Vimeo using OAuth
Accessible without login Plain text file login_with_vk.php Example Example of logging in with VK using OAuth
Accessible without login Plain text file login_with_withings.php Example Example of logging in with Withings using OAuth
Accessible without login Plain text file login_with_wordpress.php Example Example of logging in with Wordpress using OAuth
Accessible without login Plain text file login_with_xero.php Example Example of logging in with Xero using OAuth
Accessible without login Plain text file login_with_xing.php Example Example of logging in with XING using OAuth
Accessible without login Plain text file login_with_yahoo.php Example Example of logging in with Yahoo using OAuth
Accessible without login Plain text file login_with_yandex.php Example Example of logging in with Yandex using OAuth
Accessible without login Plain text file mysqli_login_with_google.php Example Example of logging in with Google using OAuth and storing the access token in a MySQL database
Accessible without login Plain text file mysqli_login_with_twitter.php Example Example of logging in with Twitter using OAuth and storing the access token in a MySQL database
Plain text file mysqli_oauth_client.php Class OAuth client sub-class for storing and retrieving tokens in a MySQL database using the mysqli extension
Plain text file mysqli_offline_access_to_google.php Class Example of accessing the Google API offline using a OAuth token stored in a MySQL database
Accessible without login Plain text file mysqli_offline_access_to_twitter.php Example Example accessing the Twitter API offline using a OAuth token stored in a MySQL database
Accessible without login Plain text file oauth.sql Data MySQL queries to install the oauth_session table
Accessible without login Plain text file oauth_configuration.json Data External configuration of OAuth
Accessible without login Plain text file test_oauth_client.php Example Example of using the OAuth client

Install with Composer Install with Composer - Download Download all files: oauth-api.tar.gz oauth-api.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.