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 :)
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
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?
I registered as a developer with Apple. Since I work alone, I have an individual developer account.
Unfortunately, I am unable to create an iOS distribution certificate from Visual Studio (for Windows). The option is grayed out even though my role in App Store Connect is "Admin".
Visual Studio also shows me that my user is an admin - yet I don't seem to have rights to create iOS distribution certificates. I can create iOS development certificates without any problems.
I've been using the App Store Analytics API for a few weeks now with no problem, but yesterday I started to get no data from the ONE_TIME_SNAPSHOT.
It's simply returning empty, although we haven't changed anything on the code (already checked 100 times).
Anyone here with the same problem?
Automating the release process. (For policy reason need to use curl cmd, not permitted to use fastlane/etc for this step)
Reading the App Store Connect API, I am uncertain what to pass as the "http body" during the POST action. What is AppStoreVersionReleaseRequestCreateRequest I would guess it goes in the "--data-raw" of curl cmd?
There doesn't seem to be example snippet.
Draft cmd:
curl --location --request POST "<appStoreVersionReleaseRequests-api>" --header "Authorization: Bearer ${JWT}" --header 'Content-Type: application/json' --data-raw '{ "key?": "value?" }'
REF
https://developer.apple.com/documentation/appstoreconnectapi/manually_release_an_app_store_approved_version_of_your_app?changes=latest_major
It looks like Arabic is not supported by BetaBuildLocalizationCreateRequest
https://developer.apple.com/documentation/appstoreconnectapi/betabuildlocalizationcreaterequest/data/attributes
Is there any way to update this localization programmatically? If not, any timeline when it will be available?
The goal here is to add "What's New" notes automatically in CI
I've been trying to move my app creation code from fastlane to the App Store Connect API but I'm struggling with the docs. I'm unable to determine how I can create App Groups, iCloud Containers, and APNS keys.
Can someone point me towards the docs on how to create and manage these resources? Here's where I've been looking:
https://developer.apple.com/documentation/appstoreconnectapi
I imagine that I'm not looking for the correct terminology and I would appreciate the guidance to find what I'm looking for.
Thanks!!
Trying to get the relevant app (it exists and published) by this endpoint:
https://api.appstoreconnect.apple.com/v1/bundleIds/{id}/app
Receiving error 404:
"errors" : [ {
"id" : "ec7b1469-fe54-4ad5-9f2b-f665c31a6358",
"status" : "404",
"code" : "PATH_ERROR_REALTIONSHIP",
"title" : "The URL path is not valid",
"detail" : "The relationship 'app' does not exist on resource 'bundleIds'"
} ]
Doing everything according to documentation. Tried to pass both Bundle ID id and Bundle ID itself. What could be the problem?