I see that it's currently possible to report payments and tax information manually from the App Store Connect user interface, per the 'View Payment Information' section of the App Store Connect help documentation. Is there any way to retrieve this information programmatically, either via the REST API or the Reporter command line tool? The 'Finance' reports that are available through the developer tools show developer proceeds in the original currency of the transaction, not in the developer's currency post-conversion. Without currency conversion and tax information, the 'Finance' reports are not particularly useful for accounting purposes.
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
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
HI AllI am trying to use the API in Python and am getting the followin gerror:{
"errors" : [ {
"id" : "285874b4-16fb-4109-b810-ffa2973be714",
"status" : "400",
"code" : "PARAMETER_ERROR.INVALID",
"title" : "A parameter has an invalid value",
"detail" : "Invalid vendor number specified. Try again.",
"source" : {
"parameter" : "filter[vendorNumber]"
}
} ]
}I am passing the Following payload:payload = {'filter[frequency]':'DAILY', 'filter[reportSubType]': 'SUMMARY', 'filter[reportDate]':'2019-03-01', 'filter[vendorNumber]': '12345678', 'filter[reportType]': 'SALES' }Here is the request call:r = requests.get('https://api.appstoreconnect.apple.com/v1/salesReports', headers={'Authorization': 'Bearer {}'.format(token)}, params=payload)Any suggestions on how do i resolve this error?Thanks
Now that provisioning has been added to the App Store Connect API I was wondering if support for enterprise developer accounts will also be added. As of yet there is no way to generate API keys for enterprise accounts.
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.
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
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.
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.
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?
Hello everyone,
My question is how we can fetch our own apple apps download counts using API. I want to create code which will fetch total number of app downloads or installs of my app.
Is there any way to to get this data using API or any other official method. Own app download counts data [since app uploaded - today's date].
Thank you.
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)
Hi, when I request SalesReport via Connect API, I get 403 error. However, until December 28, it was working normally.
I've tried creating a new api key, but it's still a 403. Can anyone help me or tell me how to troubleshoot this? Thanks
ERROR MESSAGE
{'errors': [{'id': '***', 'status': '403', 'code': 'FORBIDDEN.REQUIRED_AGREEMENTS_MISSING_OR_EXPIRED', 'title': 'A required agreement is missing or has expired.', 'detail': 'This request requires an in-effect agreement that has not been signed or has expired.', 'links': {'see': '/agreements'}}]}
CODE
import time
import requests
import jwt
KEY_ID = "***"
ISSUER_ID = "x-x-x-x-x"
EXPIRATION_TIME = int(round(time.time() + (20 * 60)))
PRIVATE_KEY = open('PATH_TO_KEY', 'r').read()
header = {
"alg": "ES256",
"kid": KEY_ID,
"typ": "JWT"
}
payload = {
"iss": ISSUER_ID,
"exp": EXPIRATION_TIME,
"aud": "appstoreconnect-v1"
}
token = jwt.encode(payload=payload, key=PRIVATE_KEY, headers=header, algorithm='ES256')
URL = 'https://api.appstoreconnect.apple.com/v1/salesReport'
HEAD = {'Authorization': 'Bearer %s' % token}
params = {
'filter[frequency]': 'DAILY',
'filter[reportDate]': '2022-02-01',
'filter[reportSubType]': 'SUMMARY',
'filter[reportType]': 'SALES',
'filter[vendorNumber]': 'my vendor number',
}
r = requests.get(URL, params=params, headers=HEAD)
print(r.status_code) # return 403
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/***"
}
}
I would like to be able to get analytic information for app number of downloads and installs from the App Store using REST Api programmatically.
I would appreciate any resource on these REST Api for my use.
Thank 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
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?
Hi guys!
Unfortunately, the TSI Team is not willing to help me. Maybe someone here is able to help. :)
I'm trying to create a subscriptionPromotionalOffer for the AppstoreConnect API in PHP.
I'm using the latest app_store_connect_api_2.3_openapi.json and I generated the PHP API with openapi-generator-cli-6.6.0.
Request url:
https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers
I'm sending the following payload:
{
"data":{
"type":"subscriptionPromotionalOffers",
"attributes":{
"name":"TEST_SUBSCRIPTION_NAME",
"offerCode":"TEST_SUBSCRIPTION_CODE",
"duration":"ONE_YEAR",
"offerMode":"PAY_UP_FRONT",
"numberOfPeriods":1
},
"relationships":{
"subscription":{
"data":{
"type":"subscriptions",
"id":"1575201034"
}
},
"prices":{
"data":[
{
"type":"subscriptionPromotionalOfferPrices",
"id":"eyJzIjoiMTU3NTIwMTAzNCIsInQiOiJVU0EiLCJwIjoiMTAyMTIifQ"
}
]
}
}
}
}
I'm getting the following error:
`409 Conflict` response: { "errors" : [ { "id" : "79b54fc7-0e8d-4228-99ab-4937551b5303", "status" : "409", "code" : "ENTITY_ERROR.RELATIONSHIP.INVALID", "title" : "The provided entity includes a relationship with an invalid value", "detail" : "Missing a required include subscriptionPricePoint", "source" : { "pointer" : "/data/relationships/prices" } } ] }
I think the error is a wrong id for subscriptionPromotionalOfferPrices which I don't understand.
I`m saving all ids for all prices for all pricePoints for all subscriptions in my local db and try to use those ids for the subscriptionPromotionalOfferPrices. I also tried to provide the id for each country. If I do this, I get the same error for each id for each country.
The provided id eyJzIjoiMTU3NTIwMTAzNCIsInQiOiJVU0EiLCJwIjoiMTAyMTIifQ references to 26.99$ price for the USA subscriptionPricePoint.
Can someone provide me a working example for this request?
If the id is wrong, can someone tell me:
How to query the right ids for each country for each subscription?
I already tried
https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers/{id}/prices
and
https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers/{id}
to fetch information for an existing Promotional Offer, but I was not able to fetch meaningful data from that endpoints.
I'm able to modify all prices for an existing subscription via API, so I'm sure the IDs I use are valid subscriptionPricePoint ids for each country.
I'm currently trying to get app ratings using the App Store Connect API. What I want is not the individual ratings for each review but the overall rating for the app. I would like to retrieve the country-specific ratings that can be seen in the AppStoreConnect web console. It seems that the API reference does not have information on the overall rating. Is it possible to obtain this information via the API?
I see that one can get all app categories, but I don't see a way of getting all supported screenshot display types and app preview types. Is this possible and if not, is there some way of getting all supported types without having to download the API specification?