Fetch all issues for a particular project

Hi,

I am trying to fetch all issue for a specific project from sanity deployed on a private server but getting below response.

{
“detail”: “Authentication credentials were not provided.”
}

even after providing basic auth credential and when I tried to create auth token and tried to access using that token still getting below response.

{
“detail”: “API key is not valid”
}

Please help and Thanks.

How are you providing your auth credentials?
It works for me if I pass it in the request headers like this:
‘Authorization’: ‘Bearer <64-character hexidecimal auth token string>’