App Store Connect API

RSS for tag

The App Store Connect API helps you automate tasks usually done on the Apple Developer website and App Store Connect.

App Store Connect API Documentation

Post

Replies

Boosts

Views

Activity

Apple Connect API keeps getting 401 errors
Apple Connect API keeps getting 401 errors. Can you tell me in detail what the problem is? And I'm sending you an es256 type jwt to use Apple API, so could you update the exact location of the key file I use at? I've been facing a 401 error for a few days now. The data thrown from Apple's server is difficult to pinpoint and the document is too complicated. Please also provide developmental support. Currently, I am sending from node to axios.
0
0
51
11h
Apple Connect API keeps getting 401 errors
Apple Connect API keeps getting 401 errors. Can you tell me in detail what the problem is? And I'm sending you an es256 type jwt to use Apple API, so could you update the exact location of the key file I use at? I've been facing a 401 error for a few days now. The data thrown from Apple's server is difficult to pinpoint and the document is too complicated. Please also provide developmental support. Currently, I am sending from node to axios.
0
0
75
21h
Apple Appstore Summary Sales Report API updates historical reports without notification
I've had several internal users note that the Summary Sales report API has started to have updates to historical reports. As an example - a subscription quantity might be 1 when the API is queried for 1/15/24, but then if the API is queried and reconciled against itself it might be quantity of 3 when pulled 3/15/24. This only started after 1/1/24, so I am wondering if there was a change to the report logic, or a new policy that Apple has started to allow that is making backdated changes to the summary sales report. This is causing a lot of potential missed revenue and manual effort for our accounting teams. Is there any guidance that Apple team or others can provide on this topic?
1
0
68
3d
Authentication on `https://appstoreconnect.apple.com/iris/v1`
Hi, I've tried to authenticate this endpoint https://appstoreconnect.apple.com/iris/v1/betaFeedbacks with the JWT token as described in the documentation, but it's not working. I know this endpoint is not documented, but gathering the beta feedback and being able to extract it to some ticket system (e.g. GitHub board) would be a really helpful option for us. Does anyone know how we can authenticate this one?
1
1
578
Apr ’22
Sale Report Data Inconsistent
We are pulling data from the salesReports endpoint, specifically focusing on the Subscriber, Subscription_Event, and Subscription report types. Our goal is to perform internal analysis on our subscriptions, such as comparing renewals to new subscriptions. However, we have observed that the data quality is not as high as we would expect from Apple. While some insights can be gleaned with a degree of uncertainty, our biggest concern is the discrepancy between the data obtained from the API or manually downloaded from the portal (https://appstoreconnect.apple.com/trends/reports) and the data displayed in the Portal visualizations (https://appstoreconnect.apple.com/trends/events). This discrepancy makes cross-checking difficult and lowers our confidence in the data’s accuracy. Is anyone else experiencing similar issues, or has anyone managed to obtain reliable data for their app(s)?
0
0
47
4d
How to specify dimensions in App Analytics reports API?
I'm fetching Apple Store Connect data from the API (in particular, fetching the App Store Purchases report) and trying to replicate the dashboards that we can see under Analytics > Metrics. The thresholding that Apple applies ("Omits values with data from fewer than 5 users or 5 unique devices") means that a lot of data is lost. Is there a way of specifying the dimensions of the report? If we had less dimensions, the threshold would affect to less rows of data, and we would be able to analyze more data. It's strange that from the website of App Store Analytics we can get the data, but through the automated reports we cannot or a lot of data is lost due to not being able to set the report dimensions.
0
0
29
4d
How should I manage API keys?
I am considering the risks and management methods for API keys in case of leakage. It seems that the maximum number of active API keys that can be used at one time is 10. Is it possible to relax this limit? In the event that an API key is misused, is there a way to check the history of API requests and identify which API key was used for each request? If you have any best practices for using API keys across multiple companies, it would be helpful to know.
0
0
75
4d
AppStoreConnect API : 500 Internal Server Error
We have been receiving this error from app store connects sales reporting API for the last hour or so. No outages reported on the Developer System Status page, but curious if anyone else is experiencing the same issue? Worked fine earlier in the day. https://api.appstoreconnect.apple.com/v1/salesReports 500 { "errors": [{ "status": "500", "code": "UNEXPECTED_ERROR", "title": "An unexpected error occurred.", "detail": "An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/." }] }
11
10
552
6d
Generating Tokens for API Requests
JWT header { "alg": "ES256", "kid": "2X9R4HXF34", "typ": "JWT" } JWT payload { "iss": "57246542-96fe-1a63-e053-0824d011072a", "iat": 1528407600, "exp": 1528408800, "aud": "appstoreconnect-v1", "scope": [ "GET /v1/apps?filter[platform]=IOS" ] } JWT { "alg": "ES256", "kid": "private key", "typ": "JWT" } I would like to find out how to calculate the "iat" and "exp" for the current time by using swift mathematical calculations if possible. I want to find out how to sign the JWT with my private key after I download it, to find out how to create a JWT that would receive a HTTP Status Code 200 OK response from the Terminal.App . I received a 401 error not authorized response and to provide a proper JWT token that has not expired after my first attempt on this a application programming interface, I want to find where to place my private key if not in the "kid" ? Kind Regards
3
1
156
1w
Analytics Reports API response only returns empty data array
I am following the Downloading Analytics Reports guide which consists of five steps: request the ONGOING report generation for the app once list all analytics report requests for the app list all analytics reports based on the analytics report request id :x: list all analytics report instances based on the analytics report id list all segments of the analytics report instance to get the download url I can only complete the third step which returns a list of all available reports. However when I continue with step four, the request for the analytics report instances returns with a response code 200 but the data array is always empty: I am using the Home Screen Widget Installs report but this is also happening for other reports Also changing or omitting the filter doesn't change anything { "data": [], "links": { "self": "https://api.appstoreconnect.apple.com/v1/analyticsReports/{reportId}/instances?filter%5Bgranularity%5D=DAILY" }, "meta": { "paging": { "total": 0, "limit": 50 } } } What could be the reason that the data array is empty and how can I fix it because there is no error message?
3
1
119
1w
server-side iap authentication error code 401
I created a project to validate in-app purchase receipts using c# but I always get error 401, you don't have permission, I followed the instructions exactly but still failed, I created a private key in Certificates, IDs & Profiles and download the .p8 file but it still doesn't work, I also created and tried another key in Users and Access > Integrations > App Store Connect API and also In-App Purchase but it still doesn't work. When I try to put the created token on jwt.io, I always get an Invalid Signature error using Jose; using System; using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Security.Cryptography; using System.Threading.Tasks; using System.IO; using System.Net; namespace CheckIAP { internal class Program { static async Task Main(string[] args) { string jwtToken = GenerateAppStoreJwtToken(); string transactionId = "110002159078***"; Console.WriteLine(jwtToken); string url = $"https://api.storekit.itunes.apple.com/inApps/v2/history/{transactionId}"; using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jwtToken); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { string responseData = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseData); } else { Console.WriteLine($"Error: {response.StatusCode}, {response.ReasonPhrase}"); string responseData = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseData); } } Console.ReadLine(); } public static string GenerateAppStoreJwtToken() { string teamId = "PZG479xxxx"; string keyId = "JCXH26xxxx"; string issuerId = "7aa0c9c2-***-***-***-xxxx"; string bundleId = "com.***.***"; const string API_KEY = "MIGTAgEAMBMGByqGSM...."; var header = new Dictionary<string, object>() { { "alg", "ES256" }, { "kid", keyId }, { "typ", "JWT" } }; var payload = new Dictionary<string, object> { { "iss", issuerId }, { "iat", DateTimeOffset.UtcNow.ToUnixTimeSeconds() }, { "exp", DateTimeOffset.UtcNow.AddMinutes(15).ToUnixTimeSeconds() }, { "aud", "appstoreconnect-v1" }, { "sub", bundleId } }; var key = CngKey.Import(Convert.FromBase64String(API_KEY), CngKeyBlobFormat.Pkcs8PrivateBlob); return Jose.JWT.Encode(payload, key, JwsAlgorithm.ES256, header); } } }
2
0
118
1w
Finance Report
Hi, I'm just using the APPLE api to get the sales, installs and profit data for the month but I don't know why I think I'm not getting all the data because if I look at the financial cut for the month (APRIL FOR EXAMPLE) I see that APPLE it pays me XYZ amount, but in the API, if I get the profit or the sales, neither gives me the correct amount from the financial report. I am doing something wrong? how can i get the correct amount using the APIs
0
0
67
1w
Beta tester remove API failed with 500 error
https://api.appstoreconnect.apple.com/v1/betaTesters/{id} Cannot call delete on any of the above Cannot be uninstalled from the app store console (IDs cannot be provided as personal information) { "errors": [ { "status": "500", "code": "UNEXPECTED_ERROR", "title": "An unexpected error occurred.", "detail": "An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/." } ] }
1
0
143
1w
App Store Connect API responds with status 403 Forbidden
As other threads have reported, the endpoint “GET /v1/salesReports” responds with a status of 403 (Forbidden). It worked a week ago but no longer works today. Further Information: There is no warning on https://appstoreconnect.apple.com/ after logging in. I have generated API keys with Admin, Developer, and Finance authority, but none worked. It does not reach the request rate limit per hour. Other endpoints "GET /v1/apps" for instance, respond with status 200(work properly). I would appreciate any help or advice. Thank you.
2
0
247
3w