Why I can't register user as "authenticated" and "active" using RESTUI and RESTful Web Services

Hi,

I’m trying to register a user with authenticated role and active status but I get 403 Forbidden.

This is what I’ve done so far:

Drupal 8.3

Rest Services module – enabled

Rest UI module installed and enabled

Permission for RESTful Web Services:

`Access POST on User registration resource` – Checked for all roles

In configuration => REST, enable resource “user” for POST with hal+json, and the authentication to cookies (I’m forced to check something)

Here is my Query:

POST your.drupal.website/user/register

Headers:

Content-Type: application/hal+json
Accept: application/hal+json

Body:

{
“_links”: {
“type”: {
“href”: “http://your.drupal.website/rest/type/user/user
}
},
“name”:[{“value”:”test”}],
“mail”:[{“value”:”[email protected]“}],
“roles”:[{“target_id”:”authenticated”}],
“status”: [{“value”: “1”}],
“pass”:”testpassword”
}

Any help will keep my hair at its original colour 😉

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed