On this page
Service consumer Tutorial
You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules
You might allow your site's users to get Google or Flickr photos automatically. In this case you will be a Consumer and will access service providers in behalf of your users. OAuth will make sure that your users allowed you to do so.
This tutorial will teach you how to use OAuth module in order to connect to another site. You will need to create 2 different sites so we can extract information from one into another.
OAuth module, version 2.01 or newer, has a testing module called OAuth Test, with a generic code that might be used to create your own module. You should use it with Web Services module, in order to provide both server and client (consumer) sides.
Servers
There are different ways to make two sites communicate. The most popular are REST, SOAP and XML RPC. Each provider decides which one they want to use. OAuth can work with all of them. In the consumer's point of view, the process is very similar.
Requirements
- A Drupal site with OAuth module installed, to be the consumer.
- A Drupal site with both Web Services and OAuth modules installed, to be the service provider. Configuring this site is beyound the scope of this tutorial.
Creating a new module
OAuth is a developer tool, so we might assume that you know how to program. At least how to create a Drupal module.
XML RPC
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion