Thank you! You’ve put me in the right direction.
I added the following function to functions.php and only change the response for my user 107 with the application password. It works fine for me.
add_action(‘pre_get_posts’, ‘restapi_query_drafts’);
function restapi_query_drafts($query) {
if ( get_current_user_id()==107) {
$query->set(‘post_status’, ‘publish,draft’);
}
return $query;
}