0

I want to login to drupal through JSON, I read this issue, but non of the proposed solutions helped me do that using Postman on drupal 8.2.5. specially when I send this specification :

POST: http://example.com/user/login?_format=json
Content-type: application/json
Data: { "name": "admin", "pass": "myPassword" }

Response is: 200 OK,

But the result is in HTML foramt and just shows the login page of drupal website!

  • This question is solved here: drupal.stackexchange.com/questions/185494/… – Fons Vandamme Jan 24 '17 at 17:35
  • I tested all of proposed answers of that issue, but non of them works correctly. – Mde Jan 25 '17 at 2:48
  • I think using Drupal 8.3-dev will solve your issue. There are a tremendous deal of fixes concerning REST in the new release. It's also possible to register anonymous users with REST for example in that version. – Fons Vandamme Jan 25 '17 at 7:37
  • I used Drupal 8.3-dev, but the problem not solved and it returns the same result. – Mde Feb 17 '17 at 11:21

Browse other questions tagged or ask your own question.