I am trying to automate PASS\_TYPE\_ID certificate creation via AppleConnect API, I cannot find what parameters I should use to be able to create this type of certificate.
When I try to POST this data to https://api.appstoreconnect.apple.com/v1/certificates:
{'data': {'attributes': {'certificateType': 'PASS\_TYPE\_ID', 'csrContent': '-----BEGIN CERTIFICATE REQUEST----------END CERTIFICATE REQUEST-----\n'}, 'type': 'certificates'}}
I get this error:
{'errors': [{'code': 'NOTFOUND',
'detail': "There is no identifier with ID 'null' on this team.",
'id': '5c9f7d3c-ce75-43a4-b3ac-b295a8f146db',
'status': '404',
'title': 'The specified resource does not exist'}]}
From OpenAPI spec is not clear what parameters should be used and 'certificateType': 'PASSTYPE_ID' is not covered there.
Do you have idea or example how to do it?
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 want handle our inhouse profiles juse like AppStore profiles.
But we can not genarate the key on:
https://appstoreconnect.apple.com/access/developers
Does it supported?
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?
When we use register api to register our device,
I got response that status is PROCESSING/INELIGIBLE why?
response like:
{
"type": "devices",
"id": "XXXXX",
"attributes": {
"addedDate": "2022-04-20T22:57:51.000+00:00",
"name": "XXXXX",
"deviceClass": "IPHONE",
"model": "iPhone 13 Pro Max",
"udid": "XXXXXXXXXXXXXX",
"platform": "IOS",
"status": "PROCESSING"
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/devices/***"
}
}
Hi,
i am trying to upload certificate signing request (CSR) for Pass Type ID via API, using this endpoint https://api.appstoreconnect.apple.com/v1/certificates.
Request body looks like this, with POST method and content type application/json:
{
"data": {
"attributes": {
"certificateType": "PASS_TYPE_ID",
"csrContent": "LS0tL...S0tLS0K"
},
"type": "certificates"
}
}
csrContent is base64 encoded.
The response from API is:
{
"errors" : [ {
"id" : "71a...4c9",
"status" : "404",
"code" : "NOT_FOUND",
"title" : "The specified resource does not exist",
"detail" : "There is no identifier with ID 'null' on this team."
} ]
}
CSR was created with KeyChain on Mac (as described here: https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request), but i can also do it with OpenSSL.
First of all, there is no pairing information between Pass Type Identifier and certificate in request. Status 404? I would expect 400. And given detail is totally useless... The documentation is poor for this topic: https://developer.apple.com/documentation/appstoreconnectapi/create_a_certificate. So that brings me to the idea of adding it (Pass Type Identifier) to the CSR content, but where?
I am able to read all certificates stored via Developer Account and put them together with private keys... but storing it is pain...
Does anyone have an idea?
Hey all,
This morning when trying to use my API connection to pull my app stats as I always do, I received the following error:
This request is forbidden for security reasons: The API key in use does not allow this request
My API keys had both Sales and App Manager access like it always did.
What I tried already:
Creating an API Key on the "Users and Access > Integrations" page with admin access. That's also returning the same error
I'm checking the release notes and the documentation but nothing seems to have changed
Anyone else with the same problem? I checked with a different developer account and I'm getting exactly the same problem.
Hi, I'm trying to create a response for a review through the Apple Store Connect API, but I receive the following error message when sending the body following this documentation: https://developer.apple.com/documentation/appstoreconnectapi/create_or_update_a_response_to_a_customer_review
cURL Request
--header 'Authorization: {{MY_BEARER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"attributes": {
"responseBody": "{{MY_RESPONSE}}"
},
"relationships": {
"review": {
"data": {
"id": "{{REVIEW_ID}}",
"type": "customerReviews"
}
}
},
"type": "customerReviewResponses"
}'
*I changed the cURL to not display real data, but they are filled in my request.
Error message:
"errors": [
{
"id": "5575b9ef-9005-4db2-9a89-123b1aaa9355",
"status": "422",
"code": "ENTITY_UNPROCESSABLE",
"title": "The request entity is not a valid request document object",
"detail": "Unexpected or invalid value at 'attributes'.",
"meta": {
"position": {
"row": 2,
"column": 20
}
}
}
]
}
Can you help me put together the body correctly if that's the case of the error?
API urls :
https://api.appstoreconnect.apple.com/v1/financeReports
https://api.appstoreconnect.apple.com/v1/salesReports
I'm getting server errors on both APIs.
There was a token error before, but it was resolved and another error occurred the very next day.
help us!
api_key_id :
error message:
{'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/.'}]}
After Apple seemed to have resolved our issues described here https://forums.developer.apple.com/forums/thread/747102, we are now getting 500 errors for all our sales reports from https://api.appstoreconnect.apple.com/v1/salesReports
{'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/.'}
Since about an hour ago we started to get a 404 error when trying to connect to https://api.appstoreconnect.apple.com/v1/salesReports
Not sure if this has anything to do with the launch of the Analytics API?
Is anybody else having the same issue?
I'm working on an automation for creating and updating in-app purchases using the App Store Connect API, and need to know when to create a new review submission after updating an in-app purchase or any of its associated entities (localizations, prices schedules, etc). I expect a review submission is required when ANY IAP attribute or any attribute of an IAP's associated entity us updated, but I don't have any active IAPs to experiment with in the dashboard in order to confirm that.
Hi All,
We use a small group of Mac mini units running VMs for our Apple CI system. Since you can't login to an Apple ID on an Apple Silicon VM we wanted to use an App Store Connect API token to handle all the authentication for us. In the past this has not worked but I wanted to see if it could now. The answer is no, you can not use an API token with Developer ID Cloud certificates.
The reason is that, even on an Admin role token, the DevID certificates are not enabled by default. When you are using an Apple ID this is no big deal as you can check the box to allow access, but with tokens they are minted with only the default settings for the role. This means that the option for Access to Cloud Managed Developer ID Certificates is always disabled and you can't enable it.
If we could continue logging in with an Apple ID we could stumble along with that still, but even this ability is gone on AS VMs. Right now this pretty much means that we either give up on using stateless VMs to build or we go back to manually managing all of our code signing materials. The longer term solution would be to move to Xcode Cloud, but that will take us quite some time.
I filed FB13687073 to see if there is any way to create a token that can use this checkbox.
As an admin I am trying to download API Key created by account holder. I see download button. I press it. And file is not downloaded. It just redirects me to - https://appstoreconnect.apple.com and that's it. We tried to recreate key, to use different admin accounts, to clear all cookies, use private safari browsing. And we were still not able to download it. Here is the log from Safari right after download button is pressed:
Summary
URL: https://appstoreconnect.apple.com/
Status: 304
Source: Network
Request
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Referer: https://appstoreconnect.apple.com/access/integrations/api
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15
Response
Cache-Control: no-transform, max-age=60
Date: Fri, 15 Mar 2024 14:39:25 GMT
ETag: "80beb83745b0987d62825f7280ce98e9"
Server: daiquiri/3.0.0
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-apple-jingle-correlation-key: 7CJFGHJVIWSG3WWQOYJU6FXDMY
x-content-security-policy: script-src 'self' *.apple.com
X-Content-Type-Options: nosniff
x-daiquiri-instance: daiquiri:31653001:pv50p00it-hyhk10064001:7987:24RELEASE37:daiquiri-amp-all-shared-int-002-pv, daiquiri:38493001:pv50p00it-hyhk12043901:7987:24RELEASE37:daiquiri-amp-all-shared-ext-001-pv
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
I'm working with this endpoint:
https://developer.apple.com/documentation/appstoreconnectapi/list_all_builds_of_an_app
Paging says 226 total entries. Max allowed limit to get is 200. The data is sent from oldest to newest, meaning I will never be able to get my latest build data (actually I only want my last build). There is also no sort query.
What can I do? This seems to be bugged out.
Best,
Nils
I need to get the app icon from the AppStore Connect API in order to display a list of my apps. However there seems to be no way.
I See in the appstoreconnect.apple.com website that the icons are there and available, there is even a function where you can click on it and get the high res version:
https://appstoreconnect.apple.com/apps/1504874998/distribution/ios/version/deliverable
(this link is of course not available from the outside)
I tried builds/{id}/icons which always returns nothing and found an iconAssetToken object in the builds array, but the link is weirdly formatted and leads to nothing.
Hope someone can help, I'm fairly new to the API and the usage is quite odd for me so far.
Best,
Nils
Hi,
I'm unable to create/view my private api keys, i'm admin for the organization as well as i have 'Generate Individual API Keys' permission. I'm almost certain that i've generated one some time ago (previous implementation perhaps) and the old api key is still in use.
Any advice how to generate a new one?
Thanks!
Hello!
I'm tasked with implementing the App Store Connect Analytics API report exports and I've noticed some major discrepancies between the Standard and Detailed reports.
I need to use the Detailed report specifically because of the breakdown by 'Source Info' which lets us break downloads and revenue down by specific App Referrers.
I have exported and processed both Standard and Detailed reports for one of our apps. Standard report downloads totals do match with the App Store Connect Metrics dashboard. However the detailed report totals appear wildly inaccurate.
Just as an example, I requested ONE_TIME_SNAPSHOT reports for the same app and there are major differences in the volume of data between standard and detailed.
App Store Downloads Standard: 4,331,848 rows across 35 segments.
App Store Downloads Detailed: 1,476,971 rows across 18 segments.
The total numbers for First downloads and Redownloads are at least 40% lower in the detailed reports as they are in the standard reports/app store connect.
Unfortunately the Standard report does not offer the granularity we want and the Detailed report is missing too much data to be useful.
Are there no other official way of getting this data?
Hi to everyone,
I've been attempting to automate the download of sales reports from App Store Connect through their API, but I've facing error 403:
"id" : "2e8d7856-21f7-4436-9aa3-f43c36913d21",
"status" : "403",
"code" : "FORBIDDEN_ERROR",
"title" : "This request is forbidden for security reasons",
"detail" : "The API key in use does not allow this request"
Below is the Python script I'm using to execute the API call, and I've confirmed my user role is set to admin:
from datetime import datetime, timedelta
from time import time, mktime
import jwt
import requests
dt = datetime.now() + timedelta(minutes=19)
KEY_ID = "***"
ISSUER_ID = "***"
headers = {
"alg": "ES256",
"kid": KEY_ID,
"typ": "JWT",
}
payload = {
"iss": ISSUER_ID,
"iat": int(time()),
"exp": int(mktime(dt.timetuple())),
"aud": "appstoreconnect-v1",
}
with open("AuthKey_76VXCFGVZK.p8", "rb") as fh: # Add your file
signing_key = fh.read()
gen_jwt = jwt.encode(payload, signing_key, algorithm="ES256", headers=headers)
url = 'https://api.appstoreconnect.apple.com/v1/salesReports'
params = {
'filter[frequency]': 'YEARLY',
'filter[reportDate]': '2021',
'filter[reportSubType]': 'DETAILED',
'filter[reportType]': 'INSTALLS',
'filter[vendorNumber]': '***'
}
headers = {
'Authorization': f'Bearer {gen_jwt}'
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
with open('sales_report.csv', 'wb') as f:
f.write(response.content)
else:
print(f'Failed to download sales report: {response.status_code} - {response.text}')
I found in the forum some users (similar post) that had my same issue but it seem that there's no way out. So now I'm wondering if I made some mistake in my code.
I hope you can help me with this.
Thanks in advance.
Hello!
In the App Store Connect API there is no way to upload data in the UTC time zone, it is only available in the PST.
Meanwhile, in the web account it is possible to change the time zone, this leads to the impossibility of compiling analytics
This API endpoint https://api.appstoreconnect.apple.com/v1/salesReports
Hello, I'm creating an app in Visual Studio 2022 (Windows) and I'm attempting to go through the steps of porting it to my iPhone. However, for the past two days I've been encountering an error when attempting to log in to my individual developer account using my API key information. The message I'm getting states:
"An unexpected error occurred, An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/."
I've already tried clearing the cache and I've tried connecting on two different networks but nothing has worked. This is incredibly frustrating and I'm failing to find a solution.
Is this something I can even fix on my own, or do I just have to wait for Apple to resolve an issue?