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)?
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.
Posts under App Store Connect API tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Not sure if network related but I keep getting the following error when loading appstoreconnect or other developer portals
Failed to load resource: the server responded with a status of 404 ()
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
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.
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?
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.
您好,我们想获得App Store自定义产品页面的收益值,我们可以使用哪个API获取数据
Hello, we would like to obtain the values of proceeds to the custom product page of the App Store,Which API can we use to obtain data
Is it possible to modify "Description" and "What's New in This Version" field via App Store Connect API?
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)")
}
}
}**`
Hey all,
I'm experiencing a lot of problems with AppStore connect tonight.
Official status page says all ok:
But in reality I'm getting this:
I can't upload to TestFlight, nothing's working for me.
Anyone else has problems?
Thanks!
Secret key, requesting access to App Store Connect API, unable to submit
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?
Hey all,
I'm trying to gain access to the App Store Connect API to launch my first app on Test Flight. However when I click the agree button and try to submit, the submit button loads endlessly. I have tried on Safari, Chrome, and Safari on mobile. Any ideas on how to fix this?
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 🙃
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?
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
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
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.
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?
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?