PHPackages                             printy6/oauth1 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. printy6/oauth1

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

printy6/oauth1
==============

OAuth 1.0 client library for PHP

3.1.1(3y ago)16MITPHPPHP &gt;=7.3

Since Oct 19Pushed 3y agoCompare

[ Source](https://github.com/wh5938316/oauth1)[ Packagist](https://packagist.org/packages/printy6/oauth1)[ Docs](https://github.com/risan/oauth1)[ RSS](/packages/printy6-oauth1/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

OAuth 1.0 Client Library for PHP
================================

[](#oauth-10-client-library-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/0ebafc6cff2b386b768cbd2f3e2ba05e2e416f81af436cc2e1a5880981677362/68747470733a2f2f706f7365722e707567782e6f72672f726973616e2f6f61757468312f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/risan/oauth1)[![Build Status](https://camo.githubusercontent.com/47d7611f2317b2bb85cbc543c8906c780845ec7cdbee8e80ff274fe1dd9224e5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f726973616e2f6f61757468312e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/risan/oauth1)[![Code Coverage](https://camo.githubusercontent.com/f10f3c01f0ce3d7682fc40648c3bf84b3b0237ff99caa5141e8235e53aac0cbe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f726973616e2f6f61757468312e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/risan/oauth1/)[![Code Quality](https://camo.githubusercontent.com/18d270d9152a48fb7c63141d3899d48652b2ee84dd2b5d7bc42058403bcda889/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f726973616e2f6f61757468312e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/risan/oauth1/)[![StyleCI](https://camo.githubusercontent.com/06c9156adc0f82b7d3fae283f801cebf66274bbe3fac43112633835739e0390a/68747470733a2f2f7374796c6563692e696f2f7265706f732f34383436303939302f736869656c64)](https://styleci.io/repos/48460990)[![SensioLabs Insight](https://camo.githubusercontent.com/d98080d1023db962f02108af4a98378d5fb9df07708c5e1bac339ec14bbaebf2/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f32353861396365372d393463662d346139642d613861652d3161646438666135623862652e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/258a9ce7-94cf-4a9d-a8ae-1add8fa5b8be)[![License](https://camo.githubusercontent.com/cab54932345e9aa184b47e5fff98b0273c47e67d8594d5fad837ae623bf4c262/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726973616e2f6f61757468312e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/be9d24dd9434fcbee4e5719ea11fb3d98b9231e8a2b4776af9d0f7c246cf13f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726973616e2f6f61757468312e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/risan/oauth1)

Simple, fluent and extensible OAuth 1.0 client library for PHP.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start Guide](#quick-start-guide)
- [Configuration](#configuration)
- [Signature](#signature)
- [OAuth 1.0 Flow](#oauth-10-flow)
    - [Step 1: Obtaining Temporary Credentials](#step-1-obtaining-temporary-credentials)
    - [Step 2: Generate and Redirect User to Authorization URI](#step-2-generate-and-redirect-user-to-authorization-uri)
    - [Step 3: Obtaining Token Credentials](#step-3-obtaining-token-credentials)
    - [Step 4: Accessing the Protected Resource](#step-4-accessing-the-protected-resource)
- [Making HTTP Request](#making-http-request)
- [Working with the Response](#working-with-the-response)
- [Built-In Providers](#built-in-providers)
    - [Trello](#trello)
    - [Tumblr](#tumblr)
    - [Twitter](#twitter)
    - [Upwork](#upwork)

Installation
------------

[](#installation)

The recommended way to install this package is through [Composer](https://getcomposer.org). Run the following command in your terminal to install this package:

```
composer require risan/oauth1
```

Quick Start Guide
-----------------

[](#quick-start-guide)

This package is flexible. You can use it to interact with any providers that implement OAuth 1.0 protocol, like Twitter.

Here's a quick example of how to use this package to interact with Twitter API: fetching the authorized user's tweets.

```
