Similar to this post and this request, I'm creating a OAuth client in Drupal 7 but using OAuth2.0. There's an OAuth2 module with an unpublished Drupal 7 version that I've toyed with, but it's geared pretty exclusively for servers or proxies, not clients. I've started writing a skeleton module for an OAuth2 client implementation, but before I go any further I wanted to make sure I'm not just spinning my wheels. Are there are any good modules that either implement a web services client using the OAuth2 standard, or a template module that I've missed?


A year later, there is OAuth2 Server which provides the server part only, but has tests which are a good demonstration of client code in Drupal (using drupal_http_request()), so that code can at least be used as an example. The module documentation also tries to explain basic OAuth2 concepts and potential pitfalls.


Several months later from OAuth2 Server I still couldn't find any suitable OAuth2 Client (especially one that works with OAuth2 Server). So I developed an OAuth2 Client myself.

It is also on drupal.org, but it is a sandbox and needs some review and support in order to be promoted as a full project: https://drupal.org/node/2138549

  • Looks like it's there now: drupal.org/project/oauth2_client
    – colan
    Jun 23 '14 at 20:05
  • That's right, now it is a full Drupal project. It is just an oauth2 client not a web services client (it just returns an oauth2 token). However it can be used with the module "Web service client" (drupal.org/project/wsclient). See this make file for the patches that are required: cgit.drupalcode.org/btrclient/tree/btrClient.make#n11
    – dashohoxha
    Jun 24 '14 at 3:35
  • How about Web Service Clients (the "clients" module)? I need to use that one because it's a dependency for the Remote Entity API. I really wish those two didn't have the same name.
    – colan
    Jun 24 '14 at 14:12
  • I haven't used this module before, I didn't know about it. Maybe it is better than the module wsclient and I feel sorry that I didn't find out about it before. If you want to use it with ouath2 then you will have to make a patch for it (similar to what I have done for wsclient). I think that it should not be very difficult.
    – dashohoxha
    Jun 24 '14 at 18:30
  • Thanks. I just added a comparison page for all of those modules. There's actually 3! Comparison of Web-service client modules
    – colan
    Jun 25 '14 at 16:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.