Accessing private posts through REST API, same code that works in remote doesn’t in local

The problem was that I didn’t completely clone the wp site, and I forgot to install the plugin that I used to manage user roles

The plugin is Members (“User Role Editor by Members – Best User, Role and Capability Management Plugin for WordPress”) by MemberPress, and there I can allow the roles that I want to have permissions to read private posts

Once that is done, the problem is gone