api.appstoreconnect.apple.com/v1/analyticsReportRequests Endpoint always returns 401 error

Hi all,

I am facing an issue with the api.appstoreconnect.apple.com/v1/analyticsReportRequests endpoint. I always get a 401 error when making POST requests to it. The JWT is generated with a team key having Admin access and it works when I make GET requests, so calling api.appstoreconnect.apple.com/v1/apps is successful for example. The body of the POST request is

  "data": {
    "type": "analyticsReportRequests",
    "attributes": {
          "accessType": "ONGOING"
    },
    "relationships": {
      "app": {
        "data": {
          "type": "apps",
          "id": "my_app_id"
        }
      }
    }
  }
}

Anyone else with the same problem or with some idea on what I might be doing wrong.

Many thanks in advance Symeon

api.appstoreconnect.apple.com/v1/analyticsReportRequests Endpoint always returns 401 error
 
 
Q