I have a custom php web site on which I need to authenticate users based on their credentials in a Drupal site. I am not very experienced with Drupal but am (mostly) finding my way. It is a Drupal 7 site.

I have found that I need the Services, Rest Server and Libraries module and they are all installed. I am using this tutorial for setting up Drupal: https://www.drupal.org/node/2424977

and this code for my remote site: Using drupal login system for another platform

I am stuck on the tutorial where I am trying to get a user token from the Drupal site. I have set up an endpoint ("rest", and when I go to it in a browser I get: "Services Endpoint "remotetest" has been setup successfully." However in the Firefox RESTClient when I try to post to https://sub.domain.org/rest/user/login.json I get:

Status Code: 404 Not found : Could not find resource user.
Cache-Control: no-cache, must-revalidate
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Wed, 08 Nov 2017 18:55:24 GMT
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.18 (Ubuntu)
X-Content-Type-Options: nosniff

I have tried a few things like enabling Drupal permissions for the Services module for anonymous users (all items except manage Services) but don't know what else to do. I have also tried the login directly (why would I need a token?) but I get an error "The requested URL returned error: 404 Not found : Could not find resource user." It seems like steps are missing in the tutorial.


1 Answer 1


The tutorial does not indicate that you must enable the user resource in the rest service you set up. Doing so allows it to work.

  • go to: admin/structure/services/list/rest/resources select "login", "logout","token" in user resource. select "connect" in system resource. please try to perform the test again. Commented Nov 8, 2017 at 20:11

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