I tried to test out WordPress REST API by deleting a user (using basic authentication just to see if everything works), but no matter how I try to pass the parameters to the destination server, I always get rest_missing_callback_param.
Here is a screenshot from POSTMAN:
It happens even when I tried with PHP:
$ch = curl_init(); curl_setopt( $ch, CURLOPT_URL,"http://web.com/wp-json/wp/v2/users/3" ); curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "DELETE" ); curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' .$authToken ) ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $http_query ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); $output = curl_exec( $ch ); curl_close( $ch );
What could possibly be a problem here?
Thank you.