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?
App Store Connect API
RSS for tagThe App Store Connect API helps you automate tasks usually done on the Apple Developer website and App Store Connect.
Post
Replies
Boosts
Views
Activity
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)?
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.
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.
When attempting to download the reports at GET https://api.appstoreconnect.apple.com/v1/salesReports we get an 500 Internal Server Error.
We didn't change the code for a long time and it worked fine before. Credentials are also correct.
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/."
}]
}
So in the WWDC24 session What's new in App Store Connect a new Apple Developer Enterprise Program API is briefly mentioned at the end of the talk.
But there seems to be no other mention of it and would like to know more so that we perhaps can retire some rather not nice ways of automating Enterprise stuff :)
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
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?
Is it possible, with the new analytics API, to get analytics (for example, App Sessions) for a specific date, such as 2 months ago?
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
I'm using the App Store Server API's Get Transaction History.
If you specify DESCENDING for the sort parameter, receipts will be sorted in chronological order when verified in a sandbox environment, but in a commercial environment they will be in random order.
Is there anyone stuck with a similar problem?
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);
}
}
}
I want to do an app transfer,
but TeamPlayerID is inconsistent and I'm screwed.
What can I do?
There are 170,000 accounts.
help me.
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/."
}
]
}
Hey all,
It's been now a few weeks since we started to help clients connect to their App Store Analytics API.
I'm starting to notice that very often we'll see things like:
Small data gaps. Eg. I have data on June 1, no data on June 2-4, and then data from June 5 to now
Big data gaps. Eg. I'd have data on Jan 2024, but not on Feb-Mar 2024, then there's data again from April 2024 onwards.
The actual files from Apple are like that we're not doing any treatments whatsoever. That's happening on both ONGOING and ONE_TIME_SNAPSHOT
I also opened a Customer Support case and sent the files over 10 days ago, but no definitive answer so far.
Are you also seeing gaps like this on your data? Any tips/recommendations?
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.
We currently have an Enterprise Developer account and find it a challenge to manage devices, profiles, and so on in an automated fashion.
I am curious to understand if an API interface, similar to App Store Connect API is available - for Enterprise. There is no option in the Enterprise 'Users and Access' tab to manage or create API keys, like there is in a regular Apple Developer Account. An API would greatly simplify much of our processes.
We currently use Fastlane Spaceship to manage automated/scripted tasks around this, like adding new devices, adding devices to profiles, and so on.
We manage in the order of 70 provisioning profiles, so, it may be appreciated that adding even one device to that many profiles is not something you want do manually via the web interface - you script it - so we use Fastlane.
The issue is that Fastlane Spaceship uses a 'workround' that basically emulates a user web session, and so requires re-authentication when user session expires, and also requires re-authentication by 2FA when AppleID session expires each month.
This is no good for scripted automation on a server, as user interaction is then required.
So, I guess this is a request, or an insight as to whether or not API functionality, via API keys is coming soon to Enterprise, or never coming, or if there is some other mechanism we can use - or do we just stick with fastlane?
We have looked at Custom Apps, but don't think that fits our needs, as the apps we build hit internal test systems, which are not publicly accessible, and so not available for App Store review teams, as our understanding is that Custom apps must still pass App Store review and TestFlight review.
Thanks.
When using individual key to retrieve sales report via https://api.appstoreconnect.apple.com/v1/financeReports, I keep receiving status:500, unexpected_error. Other endpoints are fine.
Anybody also have this issue?
I use the App Store Connect API to run many parallel requests to update different parts of a single app. I am randomly getting errors such as
An unexpected error occurred on the server side.
or
The request timed out.
Usually when these errors happen, I can simply run the unsuccessful requests one or two more times and then they succeed.
Is there an explanation for this? Is this possibly caused by too many parallel requests? What is the maximum suggested number of parallel requests?