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.

App Store Connect API Documentation

Posts under App Store Connect API subtopic

Post

Replies

Boosts

Views

Activity

App Store Connect Metrics via REST API
I hope this message finds you well. I’m reaching out to ask whether specific App Store Connect metrics available in the App Analytics dashboard can also be accessed via the App Store Connect REST API. I have reviewed the official API documentation, but I couldn’t find confirmation regarding the metrics listed below. Could you kindly clarify if the following metrics are available through the REST API? And if so, could you point me to the relevant endpoints or documentation? From the "Usage" group: Installations (Opt-in only) Active Devices Deletions (Uninstalls) From the "App Store" group: Impressions (Unique Devices) Product Page Views (Unique Devices) If these metrics are not available via the REST API, is there an alternative method to programmatically access or export them? Thank you very much in advance for your help and guidance.
2
0
228
May ’25
App Store Analytics API Reports
Hi everyone, I’m new here. I’m working with the App Store Connect (ASC) Analytics API and I have some questions about how to retrieve historical data for downloads and in-app purchases. I’ve created two types of reports: 1. ONGOING: Retrieves current and recent data. 2. ONE_TIME_SNAPSHOT: Supposedly retrieves historical data. I am specifically interested in the Detailed versions: • App Store Downloads Detailed • App Store Purchases Detailed What's my problem? 1. The ONGOING report brings instances with data from the last few days, which seems correct for App Downloads. But not with Purchases, it brings just a few random days and I'm not sure about the granularity. 2. The ONE_TIME_SNAPSHOT report, however, retrieves instances with data from specific days, but the selection of these days appears to be random. I can’t figure out the criteria behind it. Does anyone know what the selection criteria are for the days that appear in the ONE_TIME_SNAPSHOT report? Is it possible to configure the date range for this type of report? Why are some historical dates available while others are not? Is there a way to ensure that the ONE_TIME_SNAPSHOT report brings data from all days within a specified range? Any advice or insights would be greatly appreciated! Thanks in advance!
0
0
242
May ’25
I can't verify App Store Notification
I'm setting up App Store Notifications for my app. Having trouble verifying even the TEST notification, through. I'm generating JWT-token and sending it via Postman. I get a successful notification UUID as a response. But my Node.JS endpoint says it can't verify it. Here's the endpoint: const fs = require('fs'); const path = require('path'); const { SignedDataVerifier, Environment } = require('@apple/app-store-server-library'); module.exports = function (sqlexec) { function loadRootCAs() { // const gPath = path.resolve(__dirname, "AppleIncRootCertificate.cer"); const g3Path = path.resolve(__dirname, "AppleRootCA-G3.cer"); // const g2Path = path.resolve(__dirname, "AppleRootCA-G2.cer"); const loadedCerts = []; try { // loadedCerts.push(fs.readFileSync(gPath)); loadedCerts.push(fs.readFileSync(g3Path)); // loadedCerts.push(fs.readFileSync(g2Path)); if (loadedCerts.length === 0) { throw new Error("No Apple Root CA certificates were loaded."); } console.log("[APPLE NOTIFICATIONS2] Apple Root CA certificates loaded successfully."); return loadedCerts; } catch (error) { console.error("❌ CRITICAL: Error loading Apple Root CA certificate(s):", error.message); console.error("Ensure 'AppleRootCA-G3.cer' (and others if specified) are present at the expected path and readable."); throw new Error("Failed to load essential Apple Root CA certificates. Notification processing will fail."); } } const appleRootCAs = loadRootCAs(); const enableOnlineChecks = true; const environment = Environment.SANDBOX; const bundleId = "SomeBundleID"; const appAppleId = undefined; // Set if you're in PRODUCTION const verifier = new SignedDataVerifier( appleRootCAs, enableOnlineChecks, environment, bundleId, appAppleId ); router.post('/notifications_refund', async function (req, res) { const signedPayload = req.body.signedPayload; try { const notificationVerificationResult = await verifier.verifyAndDecodeNotification(signedPayload); if (!notificationVerificationResult.isValid) { console.error(`[APPLE NOTIFICATIONS2] Failed to verify notification. Status: ${notificationVerificationResult.verificationStatus}, Error: ${notificationVerificationResult.errorMessage || 'N/A'}`); return res.status(400).json({ status: "error", message: "Invalid notification signature or payload." }); } const decodedNotification = notificationVerificationResult.payload; const notificationType = decodedNotification.notificationType; const subtype = decodedNotification.subtype; if (notificationType === 'TEST') { console.log(`[APPLE NOTIFICATIONS2] Received TEST notification. Subtype: ${subtype}`); // The TEST notification's data.signedTransactionInfo is a JWS representing a sample transaction. } else if (notificationType === 'REFUND') { console.log(`[APPLE NOTIFICATIONS2] Received REFUND notification. Subtype: ${subtype}`); } else { console.log(`[APPLE NOTIFICATIONS2] Received notificationType: ${notificationType}, Subtype: ${subtype}. Skipping non-refund/test type for this endpoint.`); return res.status(200).json({ status: "success", message: "Notification received, but not a type processed by this refund endpoint." }); } // Ensure data and signedTransactionInfo exist if (!decodedNotification.data || !decodedNotification.data.signedTransactionInfo) { console.error("[APPLE NOTIFICATIONS2] Notification payload is missing data or signedTransactionInfo."); return res.status(400).json({ status: "error", message: "Notification missing transaction info." }); } const transactionInfoJWS = decodedNotification.data.signedTransactionInfo; const transactionVerificationResult = await verifier.verifyAndDecodeTransaction(transactionInfoJWS); if (!transactionVerificationResult.isValid) { console.error(`[APPLE NOTIFICATIONS2] Failed to verify signedTransactionInfo. Status: ${transactionVerificationResult.verificationStatus}, Error: ${transactionVerificationResult.errorMessage || 'N/A'}`); return res.status(400).json({ status: "error", message: "Invalid signedTransactionInfo in notification." }); } const verifiedTransactionPayload = transactionVerificationResult.payload; const transactionId = verifiedTransactionPayload.originalTransactionId || verifiedTransactionPayload.transactionId; console.log(`[APPLE NOTIFICATIONS2] Successfully decoded Transaction ID: ${transactionId} for notification type ${notificationType}`); // This is where my refund logic starts in case the notif is refund, but fow now I'm just trying to verify a TEST notif return res.status(200).json({ status: "success", message: "Refund (or TEST) notification processed successfully and validated." }); } catch (error) { console.error("[APPLE NOTIFICATIONS2] Critical error processing notification:", error); // Check if the error is from the verifier or elsewhere if (error.name === 'SignedDataVerificationError') { // Example, check actual error type from library return res.status(400).json({status: "error", message: `Notification verification failed: ${error.message}`}); } return res.status(500).json({ status: "error", message: "Failed to process notification due to an internal server error." }); } }); return router; }; I tried different root certs, only G3 works, other two give errors. Also tried adding G3 intermediate (WWDRCAG3), but it doesn't seem to help. What am I doing wrong?
0
0
71
May ’25
App Store Notification
Hello, I am developing App Store Server to Server Notifications. (The app has already been deployed and is in operation.) Test notifications in both the Sandbox and Production environments have been working correctly. Additionally, I tested in-app purchases using a Sandbox account and confirmed that the server notifications are received. However, when an actual purchase is made in the live app, the server notifications are not received. Please provide the possible causes and solutions for this issue.
2
0
858
May ’25
ONE_TIME_CHARGE notification type in Production
Hello, We've integrated App Store Server Notifications V2 in our system. We are heavily relying on the ONE_TIME_CHARGE notification type to handle Consumable purchases, but this notification type is available only for Sandbox. And this is for a while now - starting with June 10th 2024 ( https://developer.apple.com/documentation/appstoreservernotifications/app-store-server-notifications-changelog#June-10-2024 ). Can you please provide a timeline for when the ONE_TIME_CHARGE notification type will be available in Production ? Thank you!
1
1
631
May ’25
Creating Advanced AppClip Experiences Via API
I'm trying to programmatically create an Advanced AppClip Experience via the API. following the docs https://developer.apple.com/documentation/appstoreconnectapi/app-clips-and-app-clip-experiences I have created the header image. But when I try to create the experience I can not figure out a) how to create a localisationID to be included in the relationships object b) how to get the included object to be recognised Any one have experience or can offer help?
1
0
126
May ’25
Apple Connect API
Hello, can any help to set a price change to any of our In-Apps programmaticly(C#). I'm have no problem to create the token and i get positive results for GET calls (like In-App purchase data or Apple PriceTemplates). My Get call is a simple HttpClient GetAsync(id) so I supposed I need a HttpClient PostAsync(url, content). The result is a "404 NotFound" which is no error shown for this call. I searched a lot to fix the error but I found nothing that is explaining this error. My content is created like this: var content = new StringContent(jsonmodel, Encoding.UTF8, "application/json"); My URL: https://api.appstoreconnect.apple.com/v1/inAppPriceSchedules My JsonModel: { "data": { "relationships": { "baseTerritory": { "data": { "id": "DEU", "type": "territories" } }, "inAppPurchase": { "data": { "id": "6448129561", "type": "inAppPurchases" } }, "manualPrices": { "data": [ { "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "type": "inAppPurchasePrices" } ] } }, "type": "inAppPurchases", "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ" }, "included": [ { "attributes": { "startDate": null, "endDate": null }, "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "relationships": { "inAppPurchasePricePoint": { "data": { "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "type": "inAppPurchasePricePoints" } }, "inAppPurchaseV2": { "data": { "id": "6448129561", "type": "inAppPurchases" } } }, "type": "inAppPurchasePrices" } ] } regards kas
0
0
104
May ’25
In-App Purchase Products Not Fetching via Unity IAP in TestFlight Builds
We are experiencing an issue with our iOS TestFlight builds where in-app purchase (IAP) products are not being retrieved as expected. We are using Unity IAP to handle our purchases, and despite having all the products correctly configured and approved in App Store Connect, we consistently receive errors such as: UnityIAP: Received 0 products Unavailable product [product_id] We have thoroughly verified that: The product identifiers are correctly configured in App Store Connect. The bundle ID mappings are correctly set on both Unity and our backend. The same setup works on the live App Store build, where purchases are fetched and validated correctly for the same set of In App products. Sandbox test accounts are being used during TestFlight testing. This issue only started appearing recently and affects the TestFlight builds only. Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox. Looking forward to your support on this matter.
4
16
960
May ’25
Unable to process your request. Please try again later
I'm trying to test my IAP in sandbox to ensure that it's functioning, but a few hours ago, I started getting the message, "Unable to process your request. Please try again later" in sandbox. Is anyone else getting this error? Below is the error in the console: Purchase did not return a transaction: Error Domain=SKServerErrorDomain Code=0 "(null)" UserInfo={developerErrorMessage=An unknown error occurred., developerErrorCode=5000000} Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox. I'm trying to push an update tonight, but won't be able to unless this is resolved.
4
3
525
May ’25
How to Best Practices for Implementing In-App Purchases (IAP) in Mobile Apps and Backend Systems
Hello everyone, I’d like to ask for your input regarding best practices for implementing In-App Purchases (IAP) across both the frontend and backend. Here’s our current flow: -Frontend (Mobile) The user opens a specific page. We initiate a payment request using react-native-iap. After the user completes the payment, we send the purchase data (receipt) to our backend. Backend: Accept the purchase receipt from the app. Validate the receipt with Apple’s server. (GET https://api.storekit.itunes.apple.com/inApps/v1/transactions/{transactionId}) If the receipt is valid and the response indicates success, we mark the payment status as PAID. We store the transaction ID in our payment module. The Issue: We recently encountered a situation where Apple returned a valid receipt, so we marked the transaction as PAID. However, later we realized that the payment status was actually Pending. { transactionId: '70002676245699', originalTransactionId: '70002676245639', bundleId: '', productId: '', purchaseDate: 1745560404000, originalPurchaseDate: 1745560404000, quantity: 1, type: 'Consumable', inAppOwnershipType: 'PURCHASED', signedDate: 1745981078460, environment: 'Production', transactionReason: 'PURCHASE', storefront: 'SGP', storefrontId: '', price: 5000, currency: 'SGD', appTransactionId: '' } This raised a few questions: Does a Pending status always resolve to Paid, or is there a risk that Apple may later mark it as Failed or Unpaid? Is there a specific field in Apple's receipt response that reliably indicates whether the purchase is truly active? Should we hold off on granting access or product delivery until the status transitions from Pending to Paid? We’d really appreciate any insights or recommendations on how to handle this edge case to avoid granting access prematurely. Thanks in advance!
0
0
213
Apr ’25
decode profileContent
Hi, I'm using the https://developer.apple.com/documentation/appstoreconnectapi/get-v1-profiles api to fetch our provisions profiles and decoding them using bash but it looks like the outputs also encoded in a other way, can someone help me fix my code? Many thanks! Example of the beginning of the output profileContent output: 01 *H 101 1 0 + �0"� *H ! !<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>AppIDName</key> .... Code: output=$(curl -X GET \ -H "Authorization: Bearer $jwt" \ -H "Content-Type: application/json" \ --globoff "https://api.appstoreconnect.apple.com/v1/profiles?fields[profiles]=name,profileContent,profileState") while read row; do name=$(echo -n "$row" | jq -r .attributes.name) profileState=$(echo -n "$row" | jq -r .attributes.profileState) profileContent=$(echo -n "$row" | jq -r .attributes.profileContent | base64 -d) done < <(echo "$output" | jq -c '.data[]')
2
0
126
Apr ’25
JWT Fails with Individual Key on App Store Server API
We want to use the App Store Server API for in-app purchase validation. Due to circumstances, we cannot use the team-based private key (team key) and must use an individual authentication key. However, the JWT authentication keeps failing when using the individual key. Could there be an issue with our code? $jwtHeaderArray = [ 'alg' => 'ES256', 'kid' => $this->KID_ID, 'typ' => 'JWT' ]; $jwtBodyArray = [ 'sub' => 'user', 'aud' => $this->ACCESS_TOKEN_AUD, 'iat' => time(), 'exp' => time() + 3600, "scope" => [ "GET /inApps/v1/transactions" ]
1
0
379
Apr ’25
Get the list of distribution certificates from app connect api
I'm trying to use the App Store Connect API to get the list of expired certificates. When I make the web service call: https://api.appstoreconnect.apple.com/v1/certificates I'm able to get the list of developer certificate. The distribution certificates are not included in the list. According to the docs, I should all of them in the result set. Is there any thing special that needs to be added the web service call to have the distribution certs included in the result set?
1
0
402
Apr ’25
App Store Server Notification V2 on non-consumables ONE_TIME_PURCHASE availability in production
In the context of implementing App Store Server Notification V2 for In-App Purchases (IAP) for non-consumables, I encountered a discrepancy between the documentation and the available information. According to the WWDC24 video https://developer.apple.com/wwdc24/10062 server-to-server notifications should be available on production environments. However, the documentation https://developer.apple.com/documentation/AppStoreServerNotifications/notificationType indicates that these notifications are not currently supported. Could you please clarify which resource is incorrect?
2
0
146
Apr ’25
App Store Connect API
Hello, I have a problem with the email address I created for my developer account not showing up in the People section In addition, I cannot access the Appstore Connect API When I click on the Team Keys section, it will be written An error has occurred. Try Again Later. Please fix this problem for me thank you
0
1
103
Apr ’25
App Store Connect shows more data than salesreports API
We're using https://api.appstoreconnect.apple.com/v1/salesReports (https://developer.apple.com/documentation/appstoreconnectapi/get-v1-salesreports) to get the First-Time Downloads as can be seen in the App Store Connect per app. But from the API we only get data since March 2025 while in the App Store Connect data can be seen since November 2022. From the API response we read the Units for entries where 'Product Type Identifier' is 1 (https://developer.apple.com/help/app-store-connect/reference/product-type-identifiers/) per Apple Identifier. The results is for all apps as we expect, but for one app we only get data since March 2025. It is indeed the case that the app has been published in March, but the same id was in use since November 2022, under another vendor though (different vendorNumber, which we don't know). Is there any way to get the statistics from before March, like can be seen in the App Store Connect? Perhaps another way of calling salesReports or another API. We tried https://appstoreconnect.apple.com/analytics/api/v1/data/timeseries as that is the call happening in App Store Connect which over there is returning data prior to March 2025, but we couldn't get it to work nor find documentation about it. Or can we feed the old data so we would get it back from salesReports?
0
0
141
Apr ’25
Issues with pulling Crash data from API
We are currently experiencing an issue accessing crash data via the App Store Connect Analytics API for several of our mobile apps. Summary of Issue: For certain app IDs, crash data is clearly visible within the App Store Connect UI under the "App Crashes" report. However, when attempting to retrieve this same data via the official Analytics API, no crash data is returned. Our integration makes the following API calls: GET /v1/analyticsReportRequests/<report_id>/reports?filter[category]=APP_USAGE GET /v1/analyticsReports/<instance_id>/instances GET /v1/analyticsReports/<instance_id>/segment (to retrieve download URL) This process works as expected for some apps, where the “App Crashes” report is available and the segment URL is returned. However, for other apps, while the crash data appears in the UI, the API does not return the “App Crashes” report or any segment URL to download the data. We’ve confirmed the report IDs and used the correct authentication headers in our requests. Question Can anyone please advise why crash data for certain apps is not available via the API, even though it is accessible via the UI? Is this a known limitation or a possible configuration issue on our account?
1
1
163
Apr ’25
Requesting Code-Level Support: Node.js Script to Fetch US Education Apps with "Exam Prep" by Revenue
Hi Apple Developer Support, I’m working on a Node.js script to fetch all apps listed under the Education category and Reference subcategory from the US App Store, where the app name includes "exam prep". My goal is to list these apps in descending order of their earned revenue (including both paid apps and those with subscriptions). To proceed, I’m looking for guidance or code-level support on: Accessing App Store metadata programmatically via Apple-approved APIs. Filtering apps by category, subcategory, and keywords in the app name. Sorting the result set by revenue (paid and subscription earnings). Is there any recommended API or service (official or via App Store Connect) that I should be using to achieve this? Appreciate any direction, documentation, or sample code that can help. Thanks in advance!
0
0
139
Apr ’25
Can't create Api key for API App Store Connect
1 Steps to reproduce the issue Login in Account/ Go to https://appstoreconnect.apple.com/. Open users and permission. Open integration tab. Select API App Store Connect. Click Team Keys. Click Generate API Key. Input name "MyTracker", role: Admin. Catch 401 status from Api and reload page. 2 Approximate date and time the error occurred (including the time zone) Errors were on: Tue, 08 Apr 2025 06:46:20 GMT Tue, 08 Apr 2025 06:16 GMT 3 Curl example curl 'https://appstoreconnect.apple.com/iris/v1/apiKeys' \ -H 'accept: application/vnd.api+json, application/json, text/csv' \ -H 'accept-language: ru,en;q=0.9' \ -H 'content-type: application/json' \ -H 'cookie: s_fid=6541AF9921104763-34AED62C094B846F; s_vi=[CS]v1|33F13BA8D23DEE97-4000106C0143A1DE[CE]; geo=FR; s_cc=true; s_sq=%5B%5BB%5D%5D; dslang=RU-RU; site=RUS; myacinfo=DAWTKNV323952cf8084a204fb20ab2508441a07d02d32f8cc74eda7d840cbff380867b48ae61921e5fb806faa4770c7d1e65515527094328232e18ce49ddca803e8229f778c921e2d83762d354b4902f941bae81b0e1f738b89100ca0e82a1901de7585abdb32c8c980be6b7a47d4dde8f8bda6c5d03bf99ed849a690050715cab6829c2bc116b2588dca6feae7d042f27dea63722388d6272430c3b987f297740a531df86c75086e6e0960340c3d5fb9a0b90da907a996f1d0710e1f4215ab62bea759468d26ecd1177667fa7d05e14d84b1f4e66048c66777c1d2c3fb7a9f7ab07bdad8452f1e56f1d5b4e365da415001aa60cdeb08c68fe5e7125284bae547cc1f27315459f61826d11232844810780d327fceb5db6768631ac678471584b6b59f69c3128400dd1a3db929b3e5e390e431623d0c77d31d7d44b49ee8d08dec56a83868f36629134b4b4806591eda69dcb6939cb0a54370f05d11769c9283a3b0566a23d52f82bfc11544d863a8a07ed0a4f2d59db20c9bfe40217f98deb42ca13e9c85aba0a16b9b8a3141a783cdf266729db12ce4fcd1f17dc1d7b16b836dab9081704b3ac0dc5ceac7851e9d4ff2c68bb2cc83e55b90cd0133ffc8565f2293e3630d8830d2871b4ab84b0043c8dda6edffc38375cb458ee9634e0a5fe3078f87d5875e0897b9a3b5804cc8d4760ffd20ffe87519172ea1a4da0a98de891602c9fcf97bf815ec291d84f8a695ce55c9e3f01ebc2585a47V3; dc=mr; itcdq=1; itctx=eyJjcCI6IjY5YTZkZThmLTUyNzAtNDdlMy1lMDUzLTViOGM3YzExYTRkMSIsImRzIjo4MjYxNTE4MzcsImV4IjoiMjAyNS00LTMgMTM6NTI6MjUifQ|68514fe2u1t0bkchgl0b4k23l6|D4t-773HLB5TsnD_wkdpMbohlYo; dqsid=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NDM2NTk1NDUsImp0aSI6ImVUUXVWQkNDVXRvUmlWSVBjNjA1WHcifQ.wGWdmFV35or5YDdjPKBbiPSuUFzUmTgK-wpY3sEEUes; wosid=ukMqpuv39tKgefzCK1YAC0; woinst=227078' \ -H 'origin: https://appstoreconnect.apple.com' \ -H 'priority: u=1, i' \ -H 'referer: https://appstoreconnect.apple.com/access/integrations/api' \ -H 'sec-ch-ua: "Chromium";v="130", "YaBrowser";v="24.12", "Not?A_Brand";v="99", "Yowser";v="2.5"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "Linux"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: same-origin' \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 YaBrowser/24.12.0.0 Safari/537.36' \ -H 'x-csrf-itc: [asc-ui]' \ --data-raw '{"data":{"type":"apiKeys","attributes":{"allAppsVisible":true,"keyType":"PUBLIC_API","nickname":"MyTracker","roles":["ADMIN"]}}}' 4 Username of each user experiencing the issue username: UNIT6.ru @ apple's account unit6ru@icloud.com 5 Web browsers that you were able to reproduce the issue in Google Chrome 6 Web browser version numbers version 134.0.6998.179 (Official build), (64 bit)
0
1
279
Apr ’25
App Store Connect Metrics via REST API
I hope this message finds you well. I’m reaching out to ask whether specific App Store Connect metrics available in the App Analytics dashboard can also be accessed via the App Store Connect REST API. I have reviewed the official API documentation, but I couldn’t find confirmation regarding the metrics listed below. Could you kindly clarify if the following metrics are available through the REST API? And if so, could you point me to the relevant endpoints or documentation? From the "Usage" group: Installations (Opt-in only) Active Devices Deletions (Uninstalls) From the "App Store" group: Impressions (Unique Devices) Product Page Views (Unique Devices) If these metrics are not available via the REST API, is there an alternative method to programmatically access or export them? Thank you very much in advance for your help and guidance.
Replies
2
Boosts
0
Views
228
Activity
May ’25
App Store Analytics API Reports
Hi everyone, I’m new here. I’m working with the App Store Connect (ASC) Analytics API and I have some questions about how to retrieve historical data for downloads and in-app purchases. I’ve created two types of reports: 1. ONGOING: Retrieves current and recent data. 2. ONE_TIME_SNAPSHOT: Supposedly retrieves historical data. I am specifically interested in the Detailed versions: • App Store Downloads Detailed • App Store Purchases Detailed What's my problem? 1. The ONGOING report brings instances with data from the last few days, which seems correct for App Downloads. But not with Purchases, it brings just a few random days and I'm not sure about the granularity. 2. The ONE_TIME_SNAPSHOT report, however, retrieves instances with data from specific days, but the selection of these days appears to be random. I can’t figure out the criteria behind it. Does anyone know what the selection criteria are for the days that appear in the ONE_TIME_SNAPSHOT report? Is it possible to configure the date range for this type of report? Why are some historical dates available while others are not? Is there a way to ensure that the ONE_TIME_SNAPSHOT report brings data from all days within a specified range? Any advice or insights would be greatly appreciated! Thanks in advance!
Replies
0
Boosts
0
Views
242
Activity
May ’25
I can't verify App Store Notification
I'm setting up App Store Notifications for my app. Having trouble verifying even the TEST notification, through. I'm generating JWT-token and sending it via Postman. I get a successful notification UUID as a response. But my Node.JS endpoint says it can't verify it. Here's the endpoint: const fs = require('fs'); const path = require('path'); const { SignedDataVerifier, Environment } = require('@apple/app-store-server-library'); module.exports = function (sqlexec) { function loadRootCAs() { // const gPath = path.resolve(__dirname, "AppleIncRootCertificate.cer"); const g3Path = path.resolve(__dirname, "AppleRootCA-G3.cer"); // const g2Path = path.resolve(__dirname, "AppleRootCA-G2.cer"); const loadedCerts = []; try { // loadedCerts.push(fs.readFileSync(gPath)); loadedCerts.push(fs.readFileSync(g3Path)); // loadedCerts.push(fs.readFileSync(g2Path)); if (loadedCerts.length === 0) { throw new Error("No Apple Root CA certificates were loaded."); } console.log("[APPLE NOTIFICATIONS2] Apple Root CA certificates loaded successfully."); return loadedCerts; } catch (error) { console.error("❌ CRITICAL: Error loading Apple Root CA certificate(s):", error.message); console.error("Ensure 'AppleRootCA-G3.cer' (and others if specified) are present at the expected path and readable."); throw new Error("Failed to load essential Apple Root CA certificates. Notification processing will fail."); } } const appleRootCAs = loadRootCAs(); const enableOnlineChecks = true; const environment = Environment.SANDBOX; const bundleId = "SomeBundleID"; const appAppleId = undefined; // Set if you're in PRODUCTION const verifier = new SignedDataVerifier( appleRootCAs, enableOnlineChecks, environment, bundleId, appAppleId ); router.post('/notifications_refund', async function (req, res) { const signedPayload = req.body.signedPayload; try { const notificationVerificationResult = await verifier.verifyAndDecodeNotification(signedPayload); if (!notificationVerificationResult.isValid) { console.error(`[APPLE NOTIFICATIONS2] Failed to verify notification. Status: ${notificationVerificationResult.verificationStatus}, Error: ${notificationVerificationResult.errorMessage || 'N/A'}`); return res.status(400).json({ status: "error", message: "Invalid notification signature or payload." }); } const decodedNotification = notificationVerificationResult.payload; const notificationType = decodedNotification.notificationType; const subtype = decodedNotification.subtype; if (notificationType === 'TEST') { console.log(`[APPLE NOTIFICATIONS2] Received TEST notification. Subtype: ${subtype}`); // The TEST notification's data.signedTransactionInfo is a JWS representing a sample transaction. } else if (notificationType === 'REFUND') { console.log(`[APPLE NOTIFICATIONS2] Received REFUND notification. Subtype: ${subtype}`); } else { console.log(`[APPLE NOTIFICATIONS2] Received notificationType: ${notificationType}, Subtype: ${subtype}. Skipping non-refund/test type for this endpoint.`); return res.status(200).json({ status: "success", message: "Notification received, but not a type processed by this refund endpoint." }); } // Ensure data and signedTransactionInfo exist if (!decodedNotification.data || !decodedNotification.data.signedTransactionInfo) { console.error("[APPLE NOTIFICATIONS2] Notification payload is missing data or signedTransactionInfo."); return res.status(400).json({ status: "error", message: "Notification missing transaction info." }); } const transactionInfoJWS = decodedNotification.data.signedTransactionInfo; const transactionVerificationResult = await verifier.verifyAndDecodeTransaction(transactionInfoJWS); if (!transactionVerificationResult.isValid) { console.error(`[APPLE NOTIFICATIONS2] Failed to verify signedTransactionInfo. Status: ${transactionVerificationResult.verificationStatus}, Error: ${transactionVerificationResult.errorMessage || 'N/A'}`); return res.status(400).json({ status: "error", message: "Invalid signedTransactionInfo in notification." }); } const verifiedTransactionPayload = transactionVerificationResult.payload; const transactionId = verifiedTransactionPayload.originalTransactionId || verifiedTransactionPayload.transactionId; console.log(`[APPLE NOTIFICATIONS2] Successfully decoded Transaction ID: ${transactionId} for notification type ${notificationType}`); // This is where my refund logic starts in case the notif is refund, but fow now I'm just trying to verify a TEST notif return res.status(200).json({ status: "success", message: "Refund (or TEST) notification processed successfully and validated." }); } catch (error) { console.error("[APPLE NOTIFICATIONS2] Critical error processing notification:", error); // Check if the error is from the verifier or elsewhere if (error.name === 'SignedDataVerificationError') { // Example, check actual error type from library return res.status(400).json({status: "error", message: `Notification verification failed: ${error.message}`}); } return res.status(500).json({ status: "error", message: "Failed to process notification due to an internal server error." }); } }); return router; }; I tried different root certs, only G3 works, other two give errors. Also tried adding G3 intermediate (WWDRCAG3), but it doesn't seem to help. What am I doing wrong?
Replies
0
Boosts
0
Views
71
Activity
May ’25
When will ONE_TIME_CHARGE notification type become available for production?
Sever notifications v1 is already deprecated and we are supposed to use the new v2 server notifications and yet arguably the most important notification type is not available for production.
Replies
7
Boosts
8
Views
1.6k
Activity
May ’25
App Store Notification
Hello, I am developing App Store Server to Server Notifications. (The app has already been deployed and is in operation.) Test notifications in both the Sandbox and Production environments have been working correctly. Additionally, I tested in-app purchases using a Sandbox account and confirmed that the server notifications are received. However, when an actual purchase is made in the live app, the server notifications are not received. Please provide the possible causes and solutions for this issue.
Replies
2
Boosts
0
Views
858
Activity
May ’25
ONE_TIME_CHARGE notification type in Production
Hello, We've integrated App Store Server Notifications V2 in our system. We are heavily relying on the ONE_TIME_CHARGE notification type to handle Consumable purchases, but this notification type is available only for Sandbox. And this is for a while now - starting with June 10th 2024 ( https://developer.apple.com/documentation/appstoreservernotifications/app-store-server-notifications-changelog#June-10-2024 ). Can you please provide a timeline for when the ONE_TIME_CHARGE notification type will be available in Production ? Thank you!
Replies
1
Boosts
1
Views
631
Activity
May ’25
Creating Advanced AppClip Experiences Via API
I'm trying to programmatically create an Advanced AppClip Experience via the API. following the docs https://developer.apple.com/documentation/appstoreconnectapi/app-clips-and-app-clip-experiences I have created the header image. But when I try to create the experience I can not figure out a) how to create a localisationID to be included in the relationships object b) how to get the included object to be recognised Any one have experience or can offer help?
Replies
1
Boosts
0
Views
126
Activity
May ’25
Apple Connect API
Hello, can any help to set a price change to any of our In-Apps programmaticly(C#). I'm have no problem to create the token and i get positive results for GET calls (like In-App purchase data or Apple PriceTemplates). My Get call is a simple HttpClient GetAsync(id) so I supposed I need a HttpClient PostAsync(url, content). The result is a "404 NotFound" which is no error shown for this call. I searched a lot to fix the error but I found nothing that is explaining this error. My content is created like this: var content = new StringContent(jsonmodel, Encoding.UTF8, "application/json"); My URL: https://api.appstoreconnect.apple.com/v1/inAppPriceSchedules My JsonModel: { "data": { "relationships": { "baseTerritory": { "data": { "id": "DEU", "type": "territories" } }, "inAppPurchase": { "data": { "id": "6448129561", "type": "inAppPurchases" } }, "manualPrices": { "data": [ { "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "type": "inAppPurchasePrices" } ] } }, "type": "inAppPurchases", "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ" }, "included": [ { "attributes": { "startDate": null, "endDate": null }, "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "relationships": { "inAppPurchasePricePoint": { "data": { "id": "eyJzIjoiNjQ0ODEyOTU2MSIsInQiOiJERVUiLCJwIjoiMTAxMjcifQ", "type": "inAppPurchasePricePoints" } }, "inAppPurchaseV2": { "data": { "id": "6448129561", "type": "inAppPurchases" } } }, "type": "inAppPurchasePrices" } ] } regards kas
Replies
0
Boosts
0
Views
104
Activity
May ’25
In-App Purchase Products Not Fetching via Unity IAP in TestFlight Builds
We are experiencing an issue with our iOS TestFlight builds where in-app purchase (IAP) products are not being retrieved as expected. We are using Unity IAP to handle our purchases, and despite having all the products correctly configured and approved in App Store Connect, we consistently receive errors such as: UnityIAP: Received 0 products Unavailable product [product_id] We have thoroughly verified that: The product identifiers are correctly configured in App Store Connect. The bundle ID mappings are correctly set on both Unity and our backend. The same setup works on the live App Store build, where purchases are fetched and validated correctly for the same set of In App products. Sandbox test accounts are being used during TestFlight testing. This issue only started appearing recently and affects the TestFlight builds only. Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox. Looking forward to your support on this matter.
Replies
4
Boosts
16
Views
960
Activity
May ’25
Unable to process your request. Please try again later
I'm trying to test my IAP in sandbox to ensure that it's functioning, but a few hours ago, I started getting the message, "Unable to process your request. Please try again later" in sandbox. Is anyone else getting this error? Below is the error in the console: Purchase did not return a transaction: Error Domain=SKServerErrorDomain Code=0 "(null)" UserInfo={developerErrorMessage=An unknown error occurred., developerErrorCode=5000000} Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox. I'm trying to push an update tonight, but won't be able to unless this is resolved.
Replies
4
Boosts
3
Views
525
Activity
May ’25
How to Best Practices for Implementing In-App Purchases (IAP) in Mobile Apps and Backend Systems
Hello everyone, I’d like to ask for your input regarding best practices for implementing In-App Purchases (IAP) across both the frontend and backend. Here’s our current flow: -Frontend (Mobile) The user opens a specific page. We initiate a payment request using react-native-iap. After the user completes the payment, we send the purchase data (receipt) to our backend. Backend: Accept the purchase receipt from the app. Validate the receipt with Apple’s server. (GET https://api.storekit.itunes.apple.com/inApps/v1/transactions/{transactionId}) If the receipt is valid and the response indicates success, we mark the payment status as PAID. We store the transaction ID in our payment module. The Issue: We recently encountered a situation where Apple returned a valid receipt, so we marked the transaction as PAID. However, later we realized that the payment status was actually Pending. { transactionId: '70002676245699', originalTransactionId: '70002676245639', bundleId: '', productId: '', purchaseDate: 1745560404000, originalPurchaseDate: 1745560404000, quantity: 1, type: 'Consumable', inAppOwnershipType: 'PURCHASED', signedDate: 1745981078460, environment: 'Production', transactionReason: 'PURCHASE', storefront: 'SGP', storefrontId: '', price: 5000, currency: 'SGD', appTransactionId: '' } This raised a few questions: Does a Pending status always resolve to Paid, or is there a risk that Apple may later mark it as Failed or Unpaid? Is there a specific field in Apple's receipt response that reliably indicates whether the purchase is truly active? Should we hold off on granting access or product delivery until the status transitions from Pending to Paid? We’d really appreciate any insights or recommendations on how to handle this edge case to avoid granting access prematurely. Thanks in advance!
Replies
0
Boosts
0
Views
213
Activity
Apr ’25
decode profileContent
Hi, I'm using the https://developer.apple.com/documentation/appstoreconnectapi/get-v1-profiles api to fetch our provisions profiles and decoding them using bash but it looks like the outputs also encoded in a other way, can someone help me fix my code? Many thanks! Example of the beginning of the output profileContent output: 01 *H 101 1 0 + �0"� *H ! !<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>AppIDName</key> .... Code: output=$(curl -X GET \ -H "Authorization: Bearer $jwt" \ -H "Content-Type: application/json" \ --globoff "https://api.appstoreconnect.apple.com/v1/profiles?fields[profiles]=name,profileContent,profileState") while read row; do name=$(echo -n "$row" | jq -r .attributes.name) profileState=$(echo -n "$row" | jq -r .attributes.profileState) profileContent=$(echo -n "$row" | jq -r .attributes.profileContent | base64 -d) done < <(echo "$output" | jq -c '.data[]')
Replies
2
Boosts
0
Views
126
Activity
Apr ’25
JWT Fails with Individual Key on App Store Server API
We want to use the App Store Server API for in-app purchase validation. Due to circumstances, we cannot use the team-based private key (team key) and must use an individual authentication key. However, the JWT authentication keeps failing when using the individual key. Could there be an issue with our code? $jwtHeaderArray = [ 'alg' => 'ES256', 'kid' => $this->KID_ID, 'typ' => 'JWT' ]; $jwtBodyArray = [ 'sub' => 'user', 'aud' => $this->ACCESS_TOKEN_AUD, 'iat' => time(), 'exp' => time() + 3600, "scope" => [ "GET /inApps/v1/transactions" ]
Replies
1
Boosts
0
Views
379
Activity
Apr ’25
Get the list of distribution certificates from app connect api
I'm trying to use the App Store Connect API to get the list of expired certificates. When I make the web service call: https://api.appstoreconnect.apple.com/v1/certificates I'm able to get the list of developer certificate. The distribution certificates are not included in the list. According to the docs, I should all of them in the result set. Is there any thing special that needs to be added the web service call to have the distribution certs included in the result set?
Replies
1
Boosts
0
Views
402
Activity
Apr ’25
App Store Server Notification V2 on non-consumables ONE_TIME_PURCHASE availability in production
In the context of implementing App Store Server Notification V2 for In-App Purchases (IAP) for non-consumables, I encountered a discrepancy between the documentation and the available information. According to the WWDC24 video https://developer.apple.com/wwdc24/10062 server-to-server notifications should be available on production environments. However, the documentation https://developer.apple.com/documentation/AppStoreServerNotifications/notificationType indicates that these notifications are not currently supported. Could you please clarify which resource is incorrect?
Replies
2
Boosts
0
Views
146
Activity
Apr ’25
App Store Connect API
Hello, I have a problem with the email address I created for my developer account not showing up in the People section In addition, I cannot access the Appstore Connect API When I click on the Team Keys section, it will be written An error has occurred. Try Again Later. Please fix this problem for me thank you
Replies
0
Boosts
1
Views
103
Activity
Apr ’25
App Store Connect shows more data than salesreports API
We're using https://api.appstoreconnect.apple.com/v1/salesReports (https://developer.apple.com/documentation/appstoreconnectapi/get-v1-salesreports) to get the First-Time Downloads as can be seen in the App Store Connect per app. But from the API we only get data since March 2025 while in the App Store Connect data can be seen since November 2022. From the API response we read the Units for entries where 'Product Type Identifier' is 1 (https://developer.apple.com/help/app-store-connect/reference/product-type-identifiers/) per Apple Identifier. The results is for all apps as we expect, but for one app we only get data since March 2025. It is indeed the case that the app has been published in March, but the same id was in use since November 2022, under another vendor though (different vendorNumber, which we don't know). Is there any way to get the statistics from before March, like can be seen in the App Store Connect? Perhaps another way of calling salesReports or another API. We tried https://appstoreconnect.apple.com/analytics/api/v1/data/timeseries as that is the call happening in App Store Connect which over there is returning data prior to March 2025, but we couldn't get it to work nor find documentation about it. Or can we feed the old data so we would get it back from salesReports?
Replies
0
Boosts
0
Views
141
Activity
Apr ’25
Issues with pulling Crash data from API
We are currently experiencing an issue accessing crash data via the App Store Connect Analytics API for several of our mobile apps. Summary of Issue: For certain app IDs, crash data is clearly visible within the App Store Connect UI under the "App Crashes" report. However, when attempting to retrieve this same data via the official Analytics API, no crash data is returned. Our integration makes the following API calls: GET /v1/analyticsReportRequests/<report_id>/reports?filter[category]=APP_USAGE GET /v1/analyticsReports/<instance_id>/instances GET /v1/analyticsReports/<instance_id>/segment (to retrieve download URL) This process works as expected for some apps, where the “App Crashes” report is available and the segment URL is returned. However, for other apps, while the crash data appears in the UI, the API does not return the “App Crashes” report or any segment URL to download the data. We’ve confirmed the report IDs and used the correct authentication headers in our requests. Question Can anyone please advise why crash data for certain apps is not available via the API, even though it is accessible via the UI? Is this a known limitation or a possible configuration issue on our account?
Replies
1
Boosts
1
Views
163
Activity
Apr ’25
Requesting Code-Level Support: Node.js Script to Fetch US Education Apps with "Exam Prep" by Revenue
Hi Apple Developer Support, I’m working on a Node.js script to fetch all apps listed under the Education category and Reference subcategory from the US App Store, where the app name includes "exam prep". My goal is to list these apps in descending order of their earned revenue (including both paid apps and those with subscriptions). To proceed, I’m looking for guidance or code-level support on: Accessing App Store metadata programmatically via Apple-approved APIs. Filtering apps by category, subcategory, and keywords in the app name. Sorting the result set by revenue (paid and subscription earnings). Is there any recommended API or service (official or via App Store Connect) that I should be using to achieve this? Appreciate any direction, documentation, or sample code that can help. Thanks in advance!
Replies
0
Boosts
0
Views
139
Activity
Apr ’25
Can't create Api key for API App Store Connect
1 Steps to reproduce the issue Login in Account/ Go to https://appstoreconnect.apple.com/. Open users and permission. Open integration tab. Select API App Store Connect. Click Team Keys. Click Generate API Key. Input name "MyTracker", role: Admin. Catch 401 status from Api and reload page. 2 Approximate date and time the error occurred (including the time zone) Errors were on: Tue, 08 Apr 2025 06:46:20 GMT Tue, 08 Apr 2025 06:16 GMT 3 Curl example curl 'https://appstoreconnect.apple.com/iris/v1/apiKeys' \ -H 'accept: application/vnd.api+json, application/json, text/csv' \ -H 'accept-language: ru,en;q=0.9' \ -H 'content-type: application/json' \ -H 'cookie: s_fid=6541AF9921104763-34AED62C094B846F; s_vi=[CS]v1|33F13BA8D23DEE97-4000106C0143A1DE[CE]; geo=FR; s_cc=true; s_sq=%5B%5BB%5D%5D; dslang=RU-RU; site=RUS; myacinfo=DAWTKNV323952cf8084a204fb20ab2508441a07d02d32f8cc74eda7d840cbff380867b48ae61921e5fb806faa4770c7d1e65515527094328232e18ce49ddca803e8229f778c921e2d83762d354b4902f941bae81b0e1f738b89100ca0e82a1901de7585abdb32c8c980be6b7a47d4dde8f8bda6c5d03bf99ed849a690050715cab6829c2bc116b2588dca6feae7d042f27dea63722388d6272430c3b987f297740a531df86c75086e6e0960340c3d5fb9a0b90da907a996f1d0710e1f4215ab62bea759468d26ecd1177667fa7d05e14d84b1f4e66048c66777c1d2c3fb7a9f7ab07bdad8452f1e56f1d5b4e365da415001aa60cdeb08c68fe5e7125284bae547cc1f27315459f61826d11232844810780d327fceb5db6768631ac678471584b6b59f69c3128400dd1a3db929b3e5e390e431623d0c77d31d7d44b49ee8d08dec56a83868f36629134b4b4806591eda69dcb6939cb0a54370f05d11769c9283a3b0566a23d52f82bfc11544d863a8a07ed0a4f2d59db20c9bfe40217f98deb42ca13e9c85aba0a16b9b8a3141a783cdf266729db12ce4fcd1f17dc1d7b16b836dab9081704b3ac0dc5ceac7851e9d4ff2c68bb2cc83e55b90cd0133ffc8565f2293e3630d8830d2871b4ab84b0043c8dda6edffc38375cb458ee9634e0a5fe3078f87d5875e0897b9a3b5804cc8d4760ffd20ffe87519172ea1a4da0a98de891602c9fcf97bf815ec291d84f8a695ce55c9e3f01ebc2585a47V3; dc=mr; itcdq=1; itctx=eyJjcCI6IjY5YTZkZThmLTUyNzAtNDdlMy1lMDUzLTViOGM3YzExYTRkMSIsImRzIjo4MjYxNTE4MzcsImV4IjoiMjAyNS00LTMgMTM6NTI6MjUifQ|68514fe2u1t0bkchgl0b4k23l6|D4t-773HLB5TsnD_wkdpMbohlYo; dqsid=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NDM2NTk1NDUsImp0aSI6ImVUUXVWQkNDVXRvUmlWSVBjNjA1WHcifQ.wGWdmFV35or5YDdjPKBbiPSuUFzUmTgK-wpY3sEEUes; wosid=ukMqpuv39tKgefzCK1YAC0; woinst=227078' \ -H 'origin: https://appstoreconnect.apple.com' \ -H 'priority: u=1, i' \ -H 'referer: https://appstoreconnect.apple.com/access/integrations/api' \ -H 'sec-ch-ua: "Chromium";v="130", "YaBrowser";v="24.12", "Not?A_Brand";v="99", "Yowser";v="2.5"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "Linux"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: same-origin' \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 YaBrowser/24.12.0.0 Safari/537.36' \ -H 'x-csrf-itc: [asc-ui]' \ --data-raw '{"data":{"type":"apiKeys","attributes":{"allAppsVisible":true,"keyType":"PUBLIC_API","nickname":"MyTracker","roles":["ADMIN"]}}}' 4 Username of each user experiencing the issue username: UNIT6.ru @ apple's account unit6ru@icloud.com 5 Web browsers that you were able to reproduce the issue in Google Chrome 6 Web browser version numbers version 134.0.6998.179 (Official build), (64 bit)
Replies
0
Boosts
1
Views
279
Activity
Apr ’25