Authentication for Web Services via OAuth

  • Deborah Nolan
  • Duncan Temple Lang
Part of the Use R! book series (USE R)


Some REST APIs require authentication to access data and services, and many are starting to require use of a more general mechanism named OAuth. This avoids logins and passwords and allows secure three-party interactions between the owner of the data, the application accessing it, and the host of the data and Web service. In this chapter, we describe the OAuth mechanism and how to use the ROAuth package in R to work with REST APIs requiring authentication with OAuth 1.0. We also describe how to work with OAuth 2.0 in R. We illustrate these authentication mechanisms using Dropbox and Google Storage as examples.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Amazon Web Services, Inc. Amazon simple storage service (Amazon S3)., 2012.
  2. [2]
    Robin Gareus. liboauth: OAuth Library functions, version 1.0.0., 2012.
  3. [3]
    Jeff Gentry and Duncan Temple Lang. ROAuth: R interface for OAuth., 2012. R package version 0.9.2.
  4. [4]
    Google, Inc. Google cloud storage: A RESTful service for storing and accessing data on Google’s networking infrastructure., 2011.
  5. [5]
    Google, Inc. Google APIs console., 2012.
  6. [6]
    Google, Inc. Using OAuth 2.0 to access Google APIs., 2012.
  7. [7]
    Eran Hammer. The OAuth 1.0 guide., 2011.
  8. [8]
    Eran Hammer-Lahav. The OAuth 1.0 Protocol. Internet Engineering Task Force (IETF), 2010.
  9. [9]
    Johnathan LeBlanc. Programming Social Applications: Building Viral Experiences with OpenSocial, OAuth, OpenID, and Distributed Web Frameworks. O’Reilly Media / Yahoo Press, Sebastopol, CA, 2011.Google Scholar
  10. [10]
    Karthik Ram and Duncan Temple Lang. rDrop: Dropbox R interface., 2012. R package version 0.3.
  11. [11]
    Duncan Temple Lang. RCurl: General network (HTTP, FTP, etc.) client interface for R., 2012. R package version 1.95-3.
  12. [12]
    Duncan Temple Lang. RGoogleStorage: Accessing the Google storage API from R., 2012. R package version 0.1-0.

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Deborah Nolan
    • 1
  • Duncan Temple Lang
    • 2
  1. 1.Department of StatisticsUniversity of CaliforniaBerkeleyUSA
  2. 2.Department of StatisticsUniversity of CaliforniaDavisUSA

Personalised recommendations