Provides JSON:API enhancements for user accounts using the JSON:API Resources. The additional endpoints will assist with building a decoupled/headless Drupal application that allows authenticated users to register, login, reset passwords, etc.

This module adds the following JSON:API endpoints:

  • /jsonapi/user/register: Register a new user
  • /jsonapi/user/password/reset: Reset user password
  • /user/{user}/password/update: Update user password

Note that the user password may also be updated using the /jsonapi/user/user/{user} endpoint provided by Drupal core.

Example requests

/jsonapi/user/register

curl --location 'https://www.example.com/jsonapi/user/register' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/vnd.api+json' \
--data-raw '{
 "data": {
 "type": "user--user",
 "attributes": {
 "name": "test 123",
 "mail": "test@test123456.com",
 "pass": "test"
 }
 
 }
}'

/jsonapi/user/password/reset

curl --location 'https://example.com/jsonapi/user/password/reset' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/json' \
--data-raw '{
 "data": {
 "type": "user--password-reset",
 "attributes": {
 "mail": "you@example.com"
 }
 }
}'
Supporting organizations:
Development
Development & maintenance

Project information

Releases

8.x-1.0-beta2 released 14 October 2024
Works with Drupal: ^10.1 || ^11

D11 support.

Install:

Development version: 8.x-1.x-dev updated 14 Oct 2024 at 10:05 UTC