Well, the problem was that tried to fetch data from the company 2 where, but it it looks like the global user access group used by the SERP was from company 1, where I had not enough rights to use Rest API.
I had to enable rest api Action in the first company to be able to read the data from the second company.
In both companies there were identical access groups except the Rest API access was OFF in the first company.