Post

Replies

Boosts

Views

Activity

Reply to api.appstoreconnect.apple.com/v1/analyticsReportRequests Endpoint always returns 401 error
Hi all, just as an update I am posting that I have also opened a case with Apple support for this. According to support since February 28 the engineers are looking into it and they will let me know once they have something. After going back end forth a couple of times to explain the issue, a dead end. A very disappointing experience I must say.
May ’25
Reply to App store connect API returns 401 with production url but works with sandbox url
Hi all, I am facing similar issues with my JWT. I generate the token using the code below: Map<String,Object> jwtHeader = new HashMap<>(); jwtHeader.put("alg","ES256"); jwtHeader.put("kid","myKeyId"); jwtHeader.put("typ","JWT"); Map<String,Object> appleJwtPayload = new HashMap<>(); appleJwtPayload.put("sub","user"); appleJwtPayload.put("iat",System.currentTimeMillis() / 1000L); appleJwtPayload.put("exp",System.currentTimeMillis() / 1000L + 60 * 15); appleJwtPayload.put("aud","appstoreconnect-v1"); appleJwtPayload.put("bid","bundleIdentifier"); PrivateKey appleKey = getPrivateKey(APPLE_PRIVATE_KEY_PATH,"EC"); String accessToken = Jwts.builder() .setClaims(appleJwtPayload) .setHeader(jwtHeader) .signWith(appleKey) .compact(); System.out.println(accessToken); I can use the generated token just fine when using the /apps endpoint like : curl --location 'https://api.appstoreconnect.apple.com/v1/apps' \ --header 'Authorization: Bearer my_JWT_Token' But when I use the same token in curl --location 'https://api.appstoreconnect.apple.com/v1/analyticsReportRequests ' \ --header 'Authorization: Bearer my_JWT_Token' \ --header 'Content-Type: application/json' \ --data '{ "data": { "type": "analyticsReportRequests", "attributes": { "accessType": "ONGOING" }, "relationships": { "app": { "data": { "type": "apps", "id": "6472717634" } } } } }' I always get a 401 error. Any ideas on what am I doing wrong ? Many thanks in advance.
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’25