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

How to receive backend notifications for consumable purchases in production?
Hi everyone, I'm implementing the server-to-server notifications for in-app purchases. According to the official documentation, the ONE_TIME_CHARGE notification is only available in the sandbox environment: "The ONE_TIME_CHARGE notification is currently available only in the sandbox environment." So my question is: what is the correct flow to receive a backend notification when a user purchases a consumable product in the production environment? I'm looking for a reliable way to know, on the server side, when a user has made a consumable purchase. Thanks in advance to anyone who can help!
0
1
121
Apr ’25
Create app in Appstore using AppStoreConnect API is giving an error.
Hello Apple Developer Team, I've followed the AppStoreConnect API documentation and created the following: I've created a API Key in App store > Integrations > Teams key, gave the role as admin. Created a valid JWT token When fetching the GET v1/apps, I can see the list of apps. Also I was able to make GET v1/users as well successfully. I've the valid bundle Id and capabilities enabled in the developer portal. Facing an issue while creating an app in App Store using AppStoreConnect API using POST call: This is my ruby script: response = api_request( method: :post, path: "/v1/apps", token: token, body: { data: { type: 'apps', attributes: { name: APP_NAME, primaryLocale: LOCALE, sku: "SKU#{Time.now.to_i}", bundleId: BUNDLE_ID, platform: 'IOS' } } } ) It gives me below error: { "errors": [ { "id": "09b465fc-316f-47b4-9bc3-9c340cb966aa", "status": "403", "code": "FORBIDDEN_ERROR", "title": "The given operation is not allowed", "detail": "The resource 'apps' does not allow 'CREATE'. Allowed operations are: GET_COLLECTION, GET_INSTANCE, UPDATE" } ] } Did anyone was able to successfully create the app in App Store via AppStoreConnect API? Could you please help me identify the root cause for the above issue and provide some inputs so that I could work on resolving them and move forward in the deployment process. Appreciate your help in reviewing this. Thank you, Santosh
0
0
228
Apr ’25
App Store Connect analytics reports return 500 API error
Call to analytics reports API randomly returns 500, sometimes more than 5 times in a row. Example URL I used: https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id}/segments. I have noticed that getting instance first by calling https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id} and then immediately after getting segments: https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id}/segments sometimes helps. Issue started at around March 27th 2025.
2
1
159
Apr ’25
STANDARD type of report returns empty data
Hello! Any clues or guidance, please? I have already spent several days fighting with secret knowledge of App Store API connect and got to this point. But this one seems like I am stuck. I call https://api.appstoreconnect.apple.com/v1/analyticsReports/r14-[my-specific-id]/instances and get empty data { "data" : [ ], "links" : { "self" : "https://api.appstoreconnect.apple.com/v1/analyticsReports/r14-[my-specific-id]/instances" }, "meta" : { "paging" : { "total" : 0, "limit" : 50 } } } r14-[my-specific-id] is the id I got from calling https://api.appstoreconnect.apple.com/v1/analyticsReportRequests/[another-specific]/reports. r14-[my-specific-id] is "App Store Discovery and Engagement Standard" according to the response from /reports endpoint. Yes, I know, that it is a valid case for DETAILED reports to get empty data due to Apple Privacy thresholds. But the report I am trying to download is STANDARD (at least, it is what the name the report ("App Store Discovery and Engagement Standard") states in /reports end point response). Basic hygiene checks: I do have numbers in App Store UI in Analytics tab for this report Out of all reports returned by /reports the greatest majority of reports return empty data but SOME reports return data properly (unfortunately, not the ones I need) Enough time has passed: I have submitted request for ONGOING report 3 calendar days ago, it got executed within 24 hours, and it is already 2 full calendar days passed since execution of my request, meaning 8am P.T. has passed two times since ONGOING equest was fulfilled Any suggestions, ideas, clues, please? (Apple, why getting simple data can become such a quest?)
2
0
131
Apr ’25
Missing report instance segments
I'm following the flow to get my reports data: get the requests (ONGOING or ONE_TIME_SNAPSHOT) for my app (https://api.appstoreconnect.apple.com/v1/apps/{{appID}}/analyticsReportRequests?filter%5BaccessType%5D=ONGOING) get the report (App Sessions Standard, for example) (https://api.appstoreconnect.apple.com/v1/analyticsReportRequests/{{requestID}}/reports?filter%5Bname%5D={{report}}) get the daily instances of the ONGOING request (https://api.appstoreconnect.apple.com/v1/analyticsReports/{{reportID}}/instances?filter%5Bgranularity%5D=DAILY) get the segments for the selected instance (https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{{instanceID}}/segments) This flow used to work fine, but recently I noticed that the earliest instances (mostly of processing date 2025-02-24 until 2025-02-27 return an error when I'm trying to get the instance segments usint the URL https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{{instanceID}}/segments. The error is the following: "title": "The specified resource does not exist", "detail": "There is no resource of type 'analyticsReportInstances' with id '32f8b58b-07da-4d50-899f-34a7c0488927'" Even when the list of instances return me such object with ID when consulting the resource https://api.appstoreconnect.apple.com/v1/analyticsReports/{{reportID}}/instances?filter%5Bgranularity%5D=DAILY: { "data": [ { "type": "analyticsReportInstances", "id": "32f8b58b-07da-4d50-899f-34a7c0488927", "attributes": { "granularity": "DAILY", "processingDate": "2025-02-25" }, "relationships": { "segments": { "links": { "self": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927/relationships/segments", "related": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927/segments" } } }, "links": { "self": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927" } }, And as for the days that I can retrieve data, there seems to be happening an Internal Server Error with frequency, but retrying the request seems to solve it.
0
0
138
Apr ’25
Incorrect data from ONE_TIME_SNAPSHOT
Hi, I need to calculate DAU, WAU, and MAU for our app and add these metrics to our corporate dashboard. To do this, I gathered data from App Sessions using the App Store Connect API. A few days after requesting the reports, they were generated, and I was able to download them. However, I noticed an issue: the data in the reports doesn't match across different granularities. The sum of sessions, unique devices, and total session duration varies across reports. For example: sum of Total Session Duration is 52626 for DAILY report, 84553 for WEKLY and 155894 for MONTHLY Is this expected behavior? I’m struggling to understand why this inconsistency occurs.
1
0
116
Apr ’25
App Store Connect API discrepancies
In the Apple Summary Sales Report using App Store Connect API, you can get a daily count of downloads and re-downloads by using the 1F and 3F values in the Product Type Identifier column. You can then cross check the download numbers against the downloads reported in the Analytics section of App Store Connect. When looking at a month of data, the first time download numbers seem to line up exactly ("1F" in the API versus "First-Time Downloads" in Appstore Store Connect). There is a discrepancy though between reported re-downloads. The total units for "3F" does not line up with the "Redownloads" numbers reported in the Analytics section of App Store Connect. The "3F" redownloads from the API appear to be 60% higher for a month compared to the App Store Connect reporting interface. What could be going on here? Is there some type of de-duplication process run on the App Store Connect web report data that is not run on the data coming out of the App Store Connect API? Any insight would be greatly appreciated.
1
0
155
Apr ’25
How to receive backend notifications for consumable purchases in production?
Hi everyone, I'm implementing the server-to-server notifications for in-app purchases. According to the official documentation, the ONE_TIME_CHARGE notification is only available in the sandbox environment: "The ONE_TIME_CHARGE notification is currently available only in the sandbox environment." So my question is: what is the correct flow to receive a backend notification when a user purchases a consumable product in the production environment? I'm looking for a reliable way to know, on the server side, when a user has made a consumable purchase. Thanks in advance to anyone who can help!
Replies
0
Boosts
1
Views
121
Activity
Apr ’25
Create app in Appstore using AppStoreConnect API is giving an error.
Hello Apple Developer Team, I've followed the AppStoreConnect API documentation and created the following: I've created a API Key in App store > Integrations > Teams key, gave the role as admin. Created a valid JWT token When fetching the GET v1/apps, I can see the list of apps. Also I was able to make GET v1/users as well successfully. I've the valid bundle Id and capabilities enabled in the developer portal. Facing an issue while creating an app in App Store using AppStoreConnect API using POST call: This is my ruby script: response = api_request( method: :post, path: "/v1/apps", token: token, body: { data: { type: 'apps', attributes: { name: APP_NAME, primaryLocale: LOCALE, sku: "SKU#{Time.now.to_i}", bundleId: BUNDLE_ID, platform: 'IOS' } } } ) It gives me below error: { "errors": [ { "id": "09b465fc-316f-47b4-9bc3-9c340cb966aa", "status": "403", "code": "FORBIDDEN_ERROR", "title": "The given operation is not allowed", "detail": "The resource 'apps' does not allow 'CREATE'. Allowed operations are: GET_COLLECTION, GET_INSTANCE, UPDATE" } ] } Did anyone was able to successfully create the app in App Store via AppStoreConnect API? Could you please help me identify the root cause for the above issue and provide some inputs so that I could work on resolving them and move forward in the deployment process. Appreciate your help in reviewing this. Thank you, Santosh
Replies
0
Boosts
0
Views
228
Activity
Apr ’25
App Store Connect analytics reports return 500 API error
Call to analytics reports API randomly returns 500, sometimes more than 5 times in a row. Example URL I used: https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id}/segments. I have noticed that getting instance first by calling https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id} and then immediately after getting segments: https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{report_instance_id}/segments sometimes helps. Issue started at around March 27th 2025.
Replies
2
Boosts
1
Views
159
Activity
Apr ’25
STANDARD type of report returns empty data
Hello! Any clues or guidance, please? I have already spent several days fighting with secret knowledge of App Store API connect and got to this point. But this one seems like I am stuck. I call https://api.appstoreconnect.apple.com/v1/analyticsReports/r14-[my-specific-id]/instances and get empty data { "data" : [ ], "links" : { "self" : "https://api.appstoreconnect.apple.com/v1/analyticsReports/r14-[my-specific-id]/instances" }, "meta" : { "paging" : { "total" : 0, "limit" : 50 } } } r14-[my-specific-id] is the id I got from calling https://api.appstoreconnect.apple.com/v1/analyticsReportRequests/[another-specific]/reports. r14-[my-specific-id] is "App Store Discovery and Engagement Standard" according to the response from /reports endpoint. Yes, I know, that it is a valid case for DETAILED reports to get empty data due to Apple Privacy thresholds. But the report I am trying to download is STANDARD (at least, it is what the name the report ("App Store Discovery and Engagement Standard") states in /reports end point response). Basic hygiene checks: I do have numbers in App Store UI in Analytics tab for this report Out of all reports returned by /reports the greatest majority of reports return empty data but SOME reports return data properly (unfortunately, not the ones I need) Enough time has passed: I have submitted request for ONGOING report 3 calendar days ago, it got executed within 24 hours, and it is already 2 full calendar days passed since execution of my request, meaning 8am P.T. has passed two times since ONGOING equest was fulfilled Any suggestions, ideas, clues, please? (Apple, why getting simple data can become such a quest?)
Replies
2
Boosts
0
Views
131
Activity
Apr ’25
Missing report instance segments
I'm following the flow to get my reports data: get the requests (ONGOING or ONE_TIME_SNAPSHOT) for my app (https://api.appstoreconnect.apple.com/v1/apps/{{appID}}/analyticsReportRequests?filter%5BaccessType%5D=ONGOING) get the report (App Sessions Standard, for example) (https://api.appstoreconnect.apple.com/v1/analyticsReportRequests/{{requestID}}/reports?filter%5Bname%5D={{report}}) get the daily instances of the ONGOING request (https://api.appstoreconnect.apple.com/v1/analyticsReports/{{reportID}}/instances?filter%5Bgranularity%5D=DAILY) get the segments for the selected instance (https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{{instanceID}}/segments) This flow used to work fine, but recently I noticed that the earliest instances (mostly of processing date 2025-02-24 until 2025-02-27 return an error when I'm trying to get the instance segments usint the URL https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{{instanceID}}/segments. The error is the following: "title": "The specified resource does not exist", "detail": "There is no resource of type 'analyticsReportInstances' with id '32f8b58b-07da-4d50-899f-34a7c0488927'" Even when the list of instances return me such object with ID when consulting the resource https://api.appstoreconnect.apple.com/v1/analyticsReports/{{reportID}}/instances?filter%5Bgranularity%5D=DAILY: { "data": [ { "type": "analyticsReportInstances", "id": "32f8b58b-07da-4d50-899f-34a7c0488927", "attributes": { "granularity": "DAILY", "processingDate": "2025-02-25" }, "relationships": { "segments": { "links": { "self": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927/relationships/segments", "related": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927/segments" } } }, "links": { "self": "https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/32f8b58b-07da-4d50-899f-34a7c0488927" } }, And as for the days that I can retrieve data, there seems to be happening an Internal Server Error with frequency, but retrying the request seems to solve it.
Replies
0
Boosts
0
Views
138
Activity
Apr ’25
Incorrect data from ONE_TIME_SNAPSHOT
Hi, I need to calculate DAU, WAU, and MAU for our app and add these metrics to our corporate dashboard. To do this, I gathered data from App Sessions using the App Store Connect API. A few days after requesting the reports, they were generated, and I was able to download them. However, I noticed an issue: the data in the reports doesn't match across different granularities. The sum of sessions, unique devices, and total session duration varies across reports. For example: sum of Total Session Duration is 52626 for DAILY report, 84553 for WEKLY and 155894 for MONTHLY Is this expected behavior? I’m struggling to understand why this inconsistency occurs.
Replies
1
Boosts
0
Views
116
Activity
Apr ’25
App Store Connect API discrepancies
In the Apple Summary Sales Report using App Store Connect API, you can get a daily count of downloads and re-downloads by using the 1F and 3F values in the Product Type Identifier column. You can then cross check the download numbers against the downloads reported in the Analytics section of App Store Connect. When looking at a month of data, the first time download numbers seem to line up exactly ("1F" in the API versus "First-Time Downloads" in Appstore Store Connect). There is a discrepancy though between reported re-downloads. The total units for "3F" does not line up with the "Redownloads" numbers reported in the Analytics section of App Store Connect. The "3F" redownloads from the API appear to be 60% higher for a month compared to the App Store Connect reporting interface. What could be going on here? Is there some type of de-duplication process run on the App Store Connect web report data that is not run on the data coming out of the App Store Connect API? Any insight would be greatly appreciated.
Replies
1
Boosts
0
Views
155
Activity
Apr ’25