App Store Connect API

RSS for tag

The App Store Connect API helps you automate tasks usually done on the Apple Developer website and App Store Connect.

Posts under App Store Connect API tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Is there a way to download payments data programmatically from App Store Connect?
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.
17
5
10k
Oct ’23
Invalid vendor number specified. Try again.
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
7
1
5.5k
Sep ’23
Create certificates via App Store Connect API
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.
2
0
4.2k
Aug ’23
It says: "There are still screenshot uploads in progress." when submit a new build
I'm submitting a new version of my app, and after click "submit for Review", it show that: A few more items are needed in order to submit for review The items listed below are required for submission:There are still screenshot uploads in progress. I didn't met this problem before. Is that mean I haven't upload all the screenshot required or it's still uploading the screenshots to App Store Connect's server? Cause before there is a "save" button after you drag images to the screenshots area, now you don't. And I think I have uploaded all the screenshots needed and I waited a day to try submit again, still the same. What should I do?
197
16
70k
2w
I want to show all of my app downloads on my web dashboard
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.
1
0
418
Jul ’23
Ability to specify the display name in the create certificate App Store Connect API
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.
1
0
954
Aug ’23
I am not able to create certificate for pass via rest api
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?
5
1
2.0k
Apr ’24
Fetch total number of app downloads or installs counts using API.
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.
4
1
11k
Oct ’23
SalesReports Api request allways 'Forbidden'
Hi, I want to download the salesReports via the API, unfortunately, over: https://api.appstoreconnect.apple.com/v1/salesReports?filter[frequency]=DAILY&filter[reportSubType]=SUMMARY&filter[reportType]=SALES&filter[vendorNumber]=<my_vendor_number> I always get: I generate the token for 15min and without any scope restriction and following the description here https://developer.apple.com/documentation/appstoreconnectapi/download_sales_and_trends_reports. Can anybody spot what I'm missing or wrongly formatted the request or any idea what I could test next to get a finally a result? thanks a lot for your help.
1
0
1k
Oct ’23
request SalesReport via Connect API got 403 FORBIDDEN.REQUIRED_AGREEMENTS_MISSING_OR_EXPIRED
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
2
0
2.2k
Jul ’23
Authentication on `https://appstoreconnect.apple.com/iris/v1`
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?
1
1
612
3w
Register device unexpected status
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/***" } }
7
2
3.3k
Oct ’23