Retriving all users with REST API not working


At the moment I’m using Postman to hit the endpoints and I have a successful Basic Authentication but so far I’m unable to get all the registered users.
My request:

returns only users that have posts even though I have inserted:

add_filter( 'rest_user_query' , 'custom_rest_user_query' );
function custom_rest_user_query( $prepared_args, $request = null ) {

  return $prepared_args;

in my functions file.
I have also tried applying a filter:[per_page]=0

But I still get the same result: Only users with posts.
I have been banging my head on for days now…

A.M.P. 10 months 2021-09-30T03:55:18-05:00 0 Answers 0 views 0

Leave an answer