The API allows to get customer reviews, but I couldn't find a way to get the average rating for each territory. Is this possible?
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
EAS build unable to authenticate with Apple.
› Saving Apple ID password to the local Keychain
Learn more
✖ Logging in...
Authentication with Apple Developer Portal failed!
Received an internal server error from Apple's App Store Connect / Developer Portal servers, please try again later
Error: credentials command failed.
Hi,
I'm writing a Python script to automate the extraction of reports from the Apple App Store Connect API, more specifically the SALES and the SUBSCRIBER reports, using Airflow.
The code passed the tests but when implemented in production, the Airflow task calling the Apple App Store Connect API fails, due to a 401 unauthorized error. This suggests there is some issue with the authentication (JWT / bearer token) part.
I tried various solutions but none of them worked.
Here is part of the code, at this point I don't really understand what is wrong.
Any help in identifying the issue is appreciated:
class AppStore(ReadApi):
def __init__(
self,
api_secret_conf: dict,
vendor_number: int,
**kwargs,
):
ReadApi.__init__(self, **kwargs)
self.kid = api_secret_conf["kid"] # Key ID
self.iss = api_secret_conf["iss"] # Issuer ID
self.private_key = api_secret_conf["private_key"] # Private key
self.vendor_number = int(vendor_number)
def generate_jwt_token(self):
# Generate jwt token required by App Store Connect API
# Each token is valid for 20 minutes (max time allowed)
jwt_headers = {"alg": "ES256", "kid": self.kid, "typ": "JWT"}
jwt_payload = {
"iss": self.iss,
"iat": int(time.time()),
"exp": int(time.time()) + 60 * 20,
"aud": "appstoreconnect-v1",
}
private_key = self.private_key.encode("utf8")
token = jwt.encode(
jwt_payload, private_key, algorithm="ES256", headers=jwt_headers
)
decoded_token = token.decode("utf-8")
return decoded_token
I want to use app store connect api to automate our build workflow. I followed https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api.But i coundn't find api keys tab in Users and Access section.
Hi, I working on a programmatical solution to collect all the App Store data. The api is working fine, I can collect the sales/finance reports. However, I also want to collect information about the impressions, product page views etc. (App analytics) Is this not possible at the moment, or is the documentation lacking this information? Thanks in advance
Hello, I'm a completely new user of Apple's sales & trends report. Could someone here help me explain the meaning of 1, 1F, and 1T in the product type identifier? Can I use them to know the number of my iOS app downloads? Thank you for your help!
I test the api in sandbox env. It works fine.
curl --location 'https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/history' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6Ij......' \
--data '{
"startDate":1693324766487,
"endDate" :1693324766587
}'
But in production env , it return 401 Unauthorized error.
My app is not publish to the apple store.
How could i confirm [errorCode 4040005] like follow steps:
If you don’t have environment information, follow these steps:
Call the endpoint using the production URL. If the call succeeds, the original transaction identifier belongs to the production environment.
If you receive an [errorCode 4040005] with errorMessage as OriginalTransactionIdNotFoundError, (or HTTP response code 404 from the Send Consumption Information endpoint), call the endpoint using the sandbox environment.
If the call succeeds, the original transaction identifier belongs to the sandbox environment. If the call fails with the same error code, the original transaction identifier isn’t present in either environment.
Why can't I see the "Keys" tab under my Apple Developer Account?
I'm already an admin and everyone from my organization already accepted the latest Terms of Service.
Hello, I write problems App Store Connect with my dashoard.
https://datrics.notion.site/App-Store-and-Google-Trends-Problems-a010d3e5e2c147dcb30398533eb5fb29
Can you help me?
https://api.appstoreconnect.apple.com/v1/users/2a449234-15b3-4056-bd87-3cfe65711a52/visibleApps
when calling this api, it's response change randomly
calling 100 times,
somtime I got
{
"data" : [ ],
"links" : {
"self" : "https://api.appstoreconnect.apple.com/v1/users/2a449234-15b3-4056-bd87-3cfe65711a52/visibleApps"
},
"meta" : {
"paging" : {
"total" : 0,
"limit" : 50
}
}
}
somtime I got
{
"data" : [ {
"type" : "apps",
"id" : "***",
"attributes" : {
"name" : "***",
"bundleId" : "***",
...
and the data count also random
(no one edit the user role and visibleapps)
this occurred after 2023/08/17 08:40 (GMT+8)
I wonder if it's caused by api met error and return the incomplete data array back?
for example, user A has 3 visible apps
and
app1 <-- fail here
then return "data" : [ ]
app1
app2
app3 <-- fail here
then return "data" : [ {app1 detail}, {app2 detail}]
Is it possible to get app analytics data such as product page views from an Apple Api?
See below image showing the data we're looking to get from an API.
I've seen code like below. Is this the way to get app analytics data? The below code isn't quite complete. Is there documentation somewhere of how to get this data properly?
Is this URL an internal URL that shouldn't be used?
https://appstoreconnect.apple.com/analytics/api/v1/data/time-series
import requests
import json
url = "https://appstoreconnect.apple.com/analytics/api/v1/data/time-series"
adamId = "0000000000" # App ID
measures = "installs" # or "impressionsTotalUnique"
cookie_dqsid = "dqsid=ey...." # ?????
payload = json.dumps({
"adamId": [adamId],
"measures": [measures],
"frequency": "day",
"startTime": "2021-10-16T00:00:00Z",
"endTime": "2021-11-14T00:00:00Z",
"group": {
"metric": measures,
"dimension": "source",
"rank": "DESCENDING",
"limit": 100
}
})
headers = {
'Host': 'appstoreconnect.apple.com',
'X-Requested-By': 'dev.apple.com',
'Cookie': cookie_dqsid,
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload, allow_redirects=False)
print(response.text)
When using the create certificate API - https://developer.apple.com/documentation/appstoreconnectapi/create_a_certificate, I get a response back similar to the following:
{
	"data" : {
		"type" : "certificates",
		"id" : "XXXXXXXXXX",
		"attributes" : {
			"serialNumber" : "YYYYYYYYYYYYYYYY",
			"certificateContent" : "...",
			"displayName" : "Created via API",
			"name" : "iOS Development: Created via API",
			"csrContent" : null,
			"platform" : "IOS",
			"expirationDate" : "2021-08-26T02:15:27.000+0000",
			"certificateType" : "IOS_DEVELOPMENT"
		},
		"links" : {
			"self" : "https://api.appstoreconnect.apple.com/v1/certificates/XXXXXXXXXX"
		}
	},
	"links" : {
		"self" : "https://api.appstoreconnect.apple.com/v1/certificates"
	}
}
The newly created certificate also shows up on the web interface with "Created via API" as its name, which makes it hard to differentiate between different certificates. I'm assuming the web interface gets the name from the "displayName" field in the response, or vice versa.
The CertificateCreateRequest object - https://developer.apple.com/documentation/appstoreconnectapi/certificatecreaterequest doesn't define a field for the display name. Does anybody know of a way to specify the display name when creating a certificate with the API? Any help is appreciated.
Hello,I am trying to create a certificate via App Store Connect API.First, I created csr by the following command. I confirmed that the generated csr can be successfuly registered to developer.apple.com manually.openssl genrsa 2048 > private.key
openssl req -new -key private.key -out private.csr -subj "/emailAddress=<my email address>/O=<my name>/C=JP"Then, I tried to create a certificate using certificates API. The token is generated using an API key with Developer role (I tried also Admin and AppManager role and all are same).curl -i \
-H'Authorization: Bearer <token>' \
-H'Content-Type: application/json' \
-d '{"data":{"attributes":{"certificateType":"IOS_DISTRIBUTION","csrContent":"'$(cat private.csr | base64)'"},"type":"certificates"}}' \
https://api.appstoreconnect.apple.com/v1/certificatesThe response was:HTTP/1.1 401 Unauthorized
Server: daiquiri/3.0.0
Date: Tue, 29 Oct 2019 03:31:38 GMT
Content-Type: application/json
Content-Length: 350
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Request-ID: QUKNKFNK2BDNPUUDIDEHJY7W
X-Rate-Limit: user-hour-lim:3600;user-hour-rem:3592;
x-daiquiri-instance: daiquiri:18493001:mr85p00it-hyhk03154801:7987:19N28
{
"errors": [{
"status": "401",
"code": "NOT_AUTHORIZED",
"title": "Authentication credentials are missing or invalid.",
"detail": "Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens"
}]
}This error message says that my token is wrong or missing. Next, so I checked if the token is valid or not by invoking other API.curl -i \
-H'Authorization: Bearer <token>' \
https://api.appstoreconnect.apple.com/v1/certificatesThis API call succeeded and showed the list of my certificates.Are there something wrong in my commands?(I wonder that the api is not available currently...)Appendix: my ruby script to generate jwtrequire 'jwt'
require 'base64'
require 'optparse'
params = {}
opt = OptionParser.new
opt.on('-i val', '--iss') { |v| params[:iss] = v }
opt.on('-k val', '--kid') { |v| params[:kid] = v }
opt.parse!
private_key = STDIN.readlines.join
key = OpenSSL::PKey::EC.new(private_key)
payload = {
iss: params[:iss],
exp: Time.now.utc.to_i + 10 * 60,
aud: 'appstoreconnect-v1'
}
header_fields = {
"kid": params[:kid],
"typ": 'JWT'
}
token = JWT.encode(payload, key, 'ES256', header_fields=header_fields)
puts tokenThank you.
Hi, I have created a certificate using app store connect api. I got the response body. Now, what is the next step? Do I need to copy the csrContent and decode it and change it to .p12 file?
Please help. Thank you
Why two api for similar things return different results.
Get beta group builds response with empty data, but get builds filter for beta group response have datas.
I hope to upload my iPad through the App Store Connect API, but I did not see any relevant content in the App Store Connect API documentation. I hope to receive assistance
Hi
Is there any way any API which gives me the ability to download all of my apps downloads/installs on my web dashboard.
I have gone through this link - https://help.apple.com/app-store-connect/#/itc14b94d665,read every word but the only thing I found is it has to be manually through app store.
I have asked the apple developer support program and they told me to follow forum or search in this documentation - https://developer.apple.com/documentation//. The only API related to statistics is App Store Connect API which I believe made for sales and trend.
Please point me in the right direction.
How can I get the daily download number of my app from the Apple Store automatically?
I looked for different ways and so far I haven't found anything.
I found this documentation that talks about bringing sales, but how can I put my app id in it (to make the request with App Store Connect API)
When uploading app screenshots, I have to provide a sourceFileChecksum and uploaded flag: https://developer.apple.com/documentation/appstoreconnectapi/appscreenshotupdaterequest/data/attributes
But that's not the case for app event screenshots, I only have to provide the uploadedflag: https://developer.apple.com/documentation/appstoreconnectapi/appeventscreenshotupdaterequest/data/attributes
The same is true for app previews and app event video clips.
Why is this different?
I got a lot of errors(400 PARAMETER_ERROR.INVALID) from a bunches of requests since yesterday, which were work well before.
Just like this:
The request failed with response code 400 PARAMETER_ERROR.INVALID
A parameter has an invalid value. 'diagnosticSignatures' is not a valid field name
The request failed with response code 400 PARAMETER_ERROR.INVALID
A parameter has an invalid value. 'perfPowerMetrics' is not a valid field name).
Are there any API change or validation strategies changes ?