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

App Store server notifications always sending notificationType TEST in sandbox
We have a Mac application that we're migrating to the App Store, and we're testing App Store server notifications and running in Sandbox. We've set up all of the appropriate URL's in App Store Connect, and testing by using the https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test link works great. We get the notification at our server with a notificationType of TEST. However, we then go through our application and do a Sandbox test purchase. It finishes fine, BUT the only notification we EVER get at our server is notificationType TEST. We assumed that in the Sandbox environment we would get SUBSCRIBED or similar, but that's not happening. Always TEST. A few notes.... our app is Objective C (rewriting in Swift really isn't an option currently), and it's using the original Storekit. We have set up App Store Connect to send V2 notifications since V1 is deprecated. All the normal processes work from the app, from logging in our Sandbox tester, to completing the purchase. Our app itself receives a successful SKPaymentTransaction. We set up the Sandbox User to do a monthly renewal every 5 minutes. We are getting notifications every 5 minutes for 12 total, but they're ALL notificationType TEST. Is there some sandbox testing setup we're missing to get actual notifications like SUBSCRIBED and EXPIRED (albeit with the data-environment set to Sandbox)?
1
0
475
Sep ’23
Appstore Connect API Current Price
Is there an API that returns the current price info? (example snippet below). I am looking to return via API the data is downloadable from the Appstore Connect UI from Download Current Price for an Inapp Product or Subscription. Countries or Regions Currency Code Price Proceeds May Adjust Automatically United States USD 1.99 1.69 N Afghanistan USD 1.99 1.69 Y Albania USD 1.99 1.41 Y
0
0
279
Oct ’23
Patching Xcode Cloud Workflows no longer working
Hello. I use the App Store Connect API with my XCode Cloud setup to update a Workflow description. Specifically PATCH https://api.appstoreconnect.apple.com/v1/ciWorkflows/{id}. A few days ago this API call stopped working, the API gives a 409 error and reports "You must provide a value for the attribute 'startConditions' with this request". I can't find anything about this attribute in the documentation if there has been a change. I tried adding it, but the API reports that this attribute doesn't exist. Has anyone else found this or has any suggestions? Thanks, David.
0
0
284
Oct ’23
Getting "List All Customer Reviews for an App" response without text in the body field
Hello! I've been wanting to capture review data from my app in AppStore, and have managed to do so using the List All Customer Reviews for an App endpoint. However, it looks like this endpoint only sends review data from reviews where the user wrote something in the text box. Is there any way i can also retrieve data from reviews where the text box is blank, meaning reviews where someone only left a rating without any text?
1
1
377
Oct ’23
Getting 401 when generating JWT token to call App Store Connect API
This is my code: import jwt from 'jsonwebtoken' import path from 'path' import fs from 'fs' // You get privateKey, apiKeyId and issuerId from your Apple App Store Connect account const filePath = path.resolve( __dirname, <PATH_TO_PRIVATE_KEY> ) const privateKey = fs.readFileSync(filePath) // this is the file you can only download once and should treat like a real, very precious key. const apiKeyId = <API_KEY_ID> const issuerId = <ISSUER_ID> let payload = { "iss": issuerId, "aud": "appstoreconnect-v1" } let token = jwt.sign(payload, privateKey, { algorithm: 'ES256', expiresIn: '60m', header: { alg: 'ES256', kid: apiKeyId, typ: 'JWT', } }); console.log('@token: ', token); // Congrats! the token printed can now be tested with the curl command below // curl -v https://api.appstoreconnect.apple.com/v1/apps --Header "Authorization: Bearer <YOUR TOKEN>" I ran this script to test the token and call the GET curl like this, but still got 401 unauthorized. curl -v https://api.appstoreconnect.apple.com/v1/apps --Header "Authorization: Bearer <token>" This is the the error text: text: '{\n' + '\t"errors": [{\n' + '\t\t"status": "401",\n' + '\t\t"code": "NOT_AUTHORIZED",\n' + '\t\t"title": "Authentication credentials are missing or invalid.",\n' + '\t\t"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"\n' + '\t}]\n' + '}', I used jwt.io to verify that the token has valid expiration date. The decoded token from jwt.io gives me these info: payload: { "iss": <ISSUER_ID>, "iat": 1696812284, "exp": 1696815884, // an hour from the issued at time "aud": "appstoreconnect-v1" } header: { "alg": "ES256", "typ": "JWT", "kid": <API_KEY_ID> } I am not so sure what can cause this 401 Unauthorized error.
3
1
869
Oct ’23
How to Programmatically Use the AirPrint API for Single-Side Printing in iOS 17
Hey, fellow iOS developers! I'm working on an app for iOS 17 and need to implement single-side printing using the AirPrint API. I've done some research, but I'm still facing a few challenges. Can anyone provide guidance or share some sample code to achieve this? I've already imported the UIKit and MobileCoreServices frameworks and have set up the basic AirPrint functionality. Now, I'm looking specifically for instructions and code to enable single-sided printing. URL - https://www.controlf5.in/ Test code `**import UIKit import MobileCoreServices // Set up AirPrint functionality func printDocument() { let printController = UIPrintInteractionController.shared let printInfo = UIPrintInfo(dictionary: nil) printInfo.outputType = .general printController.printInfo = printInfo let formatter = UIMarkupTextPrintFormatter(markupText: "Your printable content goes here") formatter.perPageContentInsets = UIEdgeInsets(top: 36, left: 36, bottom: 36, right: 36) printController.printFormatter = formatter printController.present(animated: true) { (controller, success, error) in if success { print("Printing completed successfully") } else if let error = error { print("Printing failed with error: \(error.localizedDescription)") } } }**`
1
0
676
Oct ’23
"Request Access to the App Store Connect API" dialog box is broken
I'm trying to set up Keys for the App Store Connect API. The website first makes you acknowledge a 'terms and conditions' type dialog, but the dialog seems to be broken. The submit button spins forever and the browser console shows an error. I've tried on all the browsers, desktop and mobile, and it's the same behavior. Can someone help me get past this dialog box so I can access the Keys section of the site?
15
6
954
Oct ’23
All attempts to upload .ipa via iTMSTransporter failing with error in validateAssets method (1272)
We publish many apps using our CI/CD system that makes use of the App Store Connect API and iTMSTransporter. Since around 9:00am on 19 Oct 2023 (Melbourne/Australia time UTC+10), all our attempts to upload our .ipa files using iTMSTransporter began failing. The specific command line invocation is: /usr/local/itms/bin/iTMSTransporter -m upload -v eXtreme -f "/path/to/Bundle.itmsp" -jwt {jwt-here} The error is occurring in the midst of the upload with the error message: Apple's web service operation return value: [2023-10-20 09:35:09 AEDT] <main> DBG-X: parameter Errors = [An error occurred while trying to call the requested method validateAssets. (1272)] [2023-10-20 09:35:09 AEDT] <main> DBG-X: parameter RestartClient = false [2023-10-20 09:35:09 AEDT] <main> DBG-X: parameter ErrorCode = 1272 [2023-10-20 09:35:09 AEDT] <main> DBG-X: parameter ErrorMessage = An error occurred while trying to call the requested method validateAssets. (1272) [2023-10-20 09:35:09 AEDT] <main> DBG-X: parameter Success = false [2023-10-20 09:35:09 AEDT] <main> ERROR: An error occurred while trying to call the requested method validateAssets. (1272) [2023-10-20 09:35:09 AEDT] <main> DBG-X: The error code is: 1272 Is anyone else experiencing this issue? Is there any kind of work around or something we need to change? Some other notes: The same .ipa files can be successfully uploaded manually using Transporter This is affecting apps built against both XCode 14 and XCode 15 There was an outage shown on Apple's system status for a few hours that overlaps with this period, but Apple claim it was resolved 22 hours ago 🙃
2
0
488
Oct ’23
Unable to create app store connect api key
I want to use revenuecat for making an app with purchasing function. But it required an app store connect api key , I follow the instructions, i use admin account and go to "Users and Access" --> "Keys " --> "generate app store connect api key" , but after clicking on submitting button , i just stuck at submitting , does it mean i have to wating for some time?
16
3
2.2k
Oct ’23
Apple store connect Raw Analytics Data extraction
Is there a way to get my app store analytics data like (impressions,,page views ,downloads,acquisition sources, retention ...etc ) I have tried apple connect api but the documentation only mentions download sales reports for products within the app and there no steps provided to reach your analytics data to export it to later load it in your dwh or doing analysis on
1
0
346
Oct ’23
AppStore Connect API access request
When I try to request access to the App Store Connect API, the submit button gets greyed out and the loading indicator never stops. The developer console shows an error: container.1daf9dcb901e25e9253a.js:2 POST https://appstoreconnect.apple.com/iris/v1/apiAccesses 500 (Internal Server Error) { "appName": "account", "payload": [ { "logLevel": "ERROR", "message": "API Response Error: REQUEST_API_ACCESS_RESPONSE", "url": "https://appstoreconnect.apple.com/access/api", "stackTrace": "status code: 500 --- api correlation key: OLGS2I522RZJZNRH5437YH4XUY" } ], "eventKit": "logger", "env": "PROD" } I tried this in Chrome and Safari. Same results. Could you please fix this? Thanks
16
5
1.2k
Oct ’23
Updating contentRightsDeclaration now returns FORBIDDEN_ERROR
Recently I've started receiving a "FORBIDDEN_ERROR" error when submitting a PATCH to "/v1/apps/xxxx". The data below is what is being sent: { "data": { "type": "apps", "id": "xxxx", "attributes": { "contentRightsDeclaration": "DOES_NOT_USE_THIRD_PARTY_CONTENT" } } } This used to work (for over a year) fine. We also update several other things (Category, Age Rating, Available Territories etc) and they still work as expected; this is the only type that has started (about a month or so ago) to behave this way. I also generated a new API key with full Admin privileges but the issue still occurs. The specific error returned is: { "errors" : [ { "id" : "1cfb7772-940c-46d5-bfe5-a97bbe314", "status" : "403", "code" : "FORBIDDEN_ERROR", "title" : "This request is forbidden for security reasons", "detail" : "The API key in use does not allow this request" } ] } Any ideas how to fix this or what's going on? Thanks in advance.
2
0
577
Dec ’23
appAccountToken is missing in JWSTransactionDecodedPayload
We use store kit original API for in-app purchase,I set a UUID to the SKMutablePayment object applicationUsername property, when finish the payment, In the App Store Server API, the JWSTransactionDecodedPayload object returns no appAccountToken field.This probability is extremely small, about 17 in 100,000.Does anyone have the same situation?
4
1
817
Feb ’24
JWT token is getting rejected with error "Provide a properly configured and signed bearer token, and make sure that it has not expired."
I am trying to make an api call using a JWT token generated using App store connect api key. The token is rejected with the following error: "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" } ] My header and payload are as follow: Header { "alg": "ES256", "kid": "<MY_KEY_ID>", "typ": "JWT" } Payload { "iss": "<MY_ISSUER_ID>", "aud": "appstoreconnect-v1", "iat": 1698333493, "exp": 1698333793 } I am unable to find what is wrong with my token. Can someone help me with this?
1
0
566
Oct ’23