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 tag

211 Posts
Sort by:
Post not yet marked as solved
1 Replies
1.2k Views
The release notes for Xcode 15 mentions that xcodebuild has support for automatic distribution: xcodebuild -exportArchive supports using App Store Connect authentication keys to upload apps to App Store Connect and the Apple notary service. (76036452) I'm not able to find any documentation about the flags or options to pass to xcodebuild to do automatic TestFlight uploading, and it's not covered in the xcodebuild man pages either. Can someone detail what the command-line flags are to enable this?
Posted
by
Post not yet marked as solved
0 Replies
323 Views
Hi! I am working with App Store Connect API, and I am receiving this error when I want to make a post. "'2023-07-12T20:25:38.321Z' is not a valid value for the attribute 'expirationDate'. Expected an ISO 8601 date", my code is: const date = new Date(addMonths(new Date(), 1)); const formattedDate = date.toISOString(); try { const data = { attributes: { numberOfCodes: 1, expirationDate: formattedDate, }, relationships: { offerCode: { data: { id: 'productID', type: 'subscriptionOfferCodes', }, }, }, type: 'subscriptionOfferCodeOneTimeUseCodes', }; const result = await axios.post( 'https://api.appstoreconnect.apple.com/v1/subscriptionOfferCodeOneTimeUseCodes', { data }, { headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` } }, ); Could someone let me know wich is the issue with my date. I think 2023-07-12T20:25:38.321Z is a ISO 8601 format Thank you!!
Posted
by
Post marked as solved
2 Replies
1k Views
Hi guys! Unfortunately, the TSI Team is not willing to help me. Maybe someone here is able to help. :) I'm trying to create a subscriptionPromotionalOffer for the AppstoreConnect API in PHP. I'm using the latest app_store_connect_api_2.3_openapi.json and I generated the PHP API with openapi-generator-cli-6.6.0. Request url: https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers I'm sending the following payload: { "data":{ "type":"subscriptionPromotionalOffers", "attributes":{ "name":"TEST_SUBSCRIPTION_NAME", "offerCode":"TEST_SUBSCRIPTION_CODE", "duration":"ONE_YEAR", "offerMode":"PAY_UP_FRONT", "numberOfPeriods":1 }, "relationships":{ "subscription":{ "data":{ "type":"subscriptions", "id":"1575201034" } }, "prices":{ "data":[ { "type":"subscriptionPromotionalOfferPrices", "id":"eyJzIjoiMTU3NTIwMTAzNCIsInQiOiJVU0EiLCJwIjoiMTAyMTIifQ" } ] } } } } I'm getting the following error: `409 Conflict` response: { "errors" : [ { "id" : "79b54fc7-0e8d-4228-99ab-4937551b5303", "status" : "409", "code" : "ENTITY_ERROR.RELATIONSHIP.INVALID", "title" : "The provided entity includes a relationship with an invalid value", "detail" : "Missing a required include subscriptionPricePoint", "source" : { "pointer" : "/data/relationships/prices" } } ] } I think the error is a wrong id for subscriptionPromotionalOfferPrices which I don't understand. I`m saving all ids for all prices for all pricePoints for all subscriptions in my local db and try to use those ids for the subscriptionPromotionalOfferPrices. I also tried to provide the id for each country. If I do this, I get the same error for each id for each country. The provided id eyJzIjoiMTU3NTIwMTAzNCIsInQiOiJVU0EiLCJwIjoiMTAyMTIifQ references to 26.99$ price for the USA subscriptionPricePoint. Can someone provide me a working example for this request? If the id is wrong, can someone tell me: How to query the right ids for each country for each subscription? I already tried https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers/{id}/prices and https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers/{id} to fetch information for an existing Promotional Offer, but I was not able to fetch meaningful data from that endpoints. I'm able to modify all prices for an existing subscription via API, so I'm sure the IDs I use are valid subscriptionPricePoint ids for each country.
Posted
by
Post not yet marked as solved
0 Replies
585 Views
Hi! I am working with App Store Connect API for the first time, from NodeJS (if that matters, but I also tried with curl). I was able to authenticate and send GET requests with no problem, but when trying to send POST request I always get "METHOD_NOT_ALLOWED" error. Is anyone able to send post request? specifically to "https://api.appstoreconnect.apple.com/v1/certificates", but I also tried the Profiles endpoint, and I got the same problem. The docs claim its possible, but this error makes me feel something is not updated over there. Any help will be very much appreciated! Some extra information: JWT Playload: { iss:"KEY ISSUER", iat:Math.floor(Date.now() / 1000), exp:Math.floor(Date.now() / 1000) + (60 * 10), aud:'appstoreconnect-v1', scope:[ 'POST /v1/certificates' ] } JWT Options { algorithm:'ES256', header:{ alg:'ES256', kid:"KEY ID", typ:'JWT' } } Request Body(Before Stringify): { data:{ type:'certificates', attributes:{ certificateType:'IOS_DISTRIBUTION', csrContent:"PEM CERT" } } }
Posted
by
Post not yet marked as solved
0 Replies
270 Views
Hi I'm currently using "https://api.appstoreconnect.apple.com/v1/salesReports" to get all the app downloads, however, I don't seem to get the number of app clip downloads... does anyone know how I can get all the app clips downloads by using app stores API?
Posted
by
Post not yet marked as solved
0 Replies
642 Views
Hey i am trying to integrate my api with my machine for some testing work but it is showing me an error code possibility combinations 18336324201 , 08336324201 , 8336324201 , Can anyone help me out fixing this i have been working really hard for this project
Posted
by
Post marked as solved
3 Replies
610 Views
Endpoints like /v1/apps, /v1/inAppPurchasePriceSchedules/{id}, /v1/apps/${appId}/inAppPurchasesV2 that used to work yesterday and the week before no longer work today, all requests ending in 403 Forbidden response, regardless of the query parameters sent. App Store Connect API Key used today is the same, with the same status - hasnt been revoked - and token is generated the same way as before. So no changes on my side have been done, endpoints have simply stop working. However System Status page displays Available / green bullet status for everything. Dont know what else to look for. Any ideas ? Thank you.
Posted
by
Post not yet marked as solved
0 Replies
553 Views
Using the Login with Amazon SDK for iOS APIs for my new app but it always gives an error codes 18889275382 , 08889275382 , 8889275382 , The three error codes on further investigation shows that the files hosted on aws are not responding well to login with amazon sdk for IOS API
Post not yet marked as solved
1 Replies
904 Views
Dear All, I have working code that talks to the App Attest receipt refresh API using JWT authorization. I'm now trying to talk to the App Store Connect API, and I'm trying to use essentially the same code for the JWT generation - but it doesn't work. It's frustrating that the API just returns a non-specific 401 "Not Authorized" response, without giving any further clue about what's wrong. I am creating a JWT as follows for App Store Connect; yes I'm aware that the required fields are slightly different for the two APIs: header = {"alg":"ES256","kid":"12345YZSX8","typ":"JWT"} payload = {"iss":"1234567-1234-1234-1234-123456789012","iat":1687379230,"exp":1687379530,"aud":"appstoreconnect-v1"} Using the resulting encoded token, with my own code or with curl, fails with a 401 error: Status: 401 { "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" }] } Doing essentially the same thing, with the slightly different JSON fields and a different .p8 key file, does work with the App Attest API - so I'm probably not creating complete garbage. I've wasted hours on this now. Does anyone have any debugging hints?
Posted
by
Post not yet marked as solved
0 Replies
365 Views
Can we use below appstoreconnect api to only download developer provisioning profile ? or can we also use to download Enterprise provisioning profile ? https://developer.apple.com/documentation/appstoreconnectapi/list_and_download_profiles API: https://api.appstoreconnect.apple.com/v1/profiles Thanks Ravi K
Posted
by
Post not yet marked as solved
0 Replies
846 Views
Documentation for the App Store Connect API is poor, especially in comparison to the good documentation for the now-defunct XML-based "transporter" API. In the hope that it will be useful to others trying to do this in the future, here is how I was able to do a bulk update of my in-app purchases' prices using the API. Step 1: get the IDs for the IAPs, if you don't already know them: GET v1/apps/$app/inAppPurchasesV2 If you have a lot of IAPs, follow any links/next URL to get subsequent pages. The ids are in data/id . Step 2: get the current prices, if you don't already know them. I believe you need to do a separate request for each IAP (right?). GET v1/inAppPurchasePriceSchedules/$iap/manualPrices?include=inAppPurchasePricePoint,territory The price and currency are in included/attributes/customerPrice and included/attributes/currency (I generally only have one "manual" price). Step 3: look up the available price points: GET v2/inAppPurchases/$iap/pricePoints?filter[territory]=$territory The prices and IDs are in data/attributes/customerPrice and data/id. Note this query takes the specific IAP ID. I don't know why. Are the price points specific to the IAPs? Can I reuse a price point ID that I've looked up for one IAP with another IAP for the same app? Step 4: choose your new prices. Step 5: Submit the new prices: POST v1/inAppPurchasePriceSchedules { "data" : { "relationships" : { "baseTerritory" : { "data" : { "id" : "$territory", "type" : "territories" } }, "inAppPurchase" : { "data" : { "id" : "$iap", "type" : "inAppPurchases" } }, "manualPrices" : { "data" : [ { "id" : "$random_id", "type" : "inAppPurchasePrices" } ] } }, "type" : "inAppPurchasePriceSchedules" }, "included" : [ { "attributes" : { "startDate" : null, "endDate" : null }, "id" : "$random_id", "relationships" : { "inAppPurchasePricePoint" : { "data" : { "id" : "$price_point_id", "type" : "inAppPurchasePricePoints" } }, "inAppPurchaseV2" : { "data" : { "id" : "$iap", "type" : "inAppPurchases" } } }, "type" : "inAppPurchasePrices" } ] } In that, $iap is the IAP ID from step 1, $territory is probably a three-letter string like GBR, $random_id is a random identifier that you generate (using the same value in the two places) (I'm not sure what the scope of this is; do I have to check that I don't accidentally send the same value in the future, or does it only exist while this submission is processed?), and $price_point_id is the ID for the price point from step 3. I believe it is necessary to send a separate submission for each IAP (right?) That example makes the change immediately (start and end dates are both null). Note that if you want to schedule a future change, you need to include both the current period and price and the future period and price in the submission. I would like to thank @Efun whose posts in this thread: https://developer.apple.com/forums/thread/727159 helped a lot with understanding this.
Posted
by
Post not yet marked as solved
3 Replies
489 Views
I have been trying to extend a membership that is about to expire in 3 days. I send a request through the api following the instructions on this page https://developer.apple.com/documentation/appstoreserverapi/extend_a_subscription_renewal_date I get a 200 response with a body saying it was successful but the date is still the same both in the ExtendRenewalDateResponse and if I make a query to get the expiration of the subscription.
Posted
by
Post not yet marked as solved
0 Replies
445 Views
Is there a way to compare a local app screenshot on my Mac with the one currently on App Store Connect without downloading the screenshot itself? The API returns fileSize and sourceFileChecksum properties (https://developer.apple.com/documentation/appstoreconnectapi/read_app_screenshot_information), but the file size of my local image is different (url.resourceValues(forKeys: [.fileSizeKey]).fileSize) and the checksum is also different from the one I provided when completing the app screenshot upload.
Posted
by
Post not yet marked as solved
1 Replies
348 Views
Hi! I am using App Store Connect, and I am searching for an endpoint that would list the history of all prices an app product / subscription had in the past, as well as in the present. The closest I found is the List All Prices for a Subscription | Apple Developer Documentation endpoint, but it seems to only provide current and future prices. Is there a way to retrieve past prices? Thanks a lot! Raquel
Posted
by
Post not yet marked as solved
0 Replies
437 Views
I have this API call in my application. For some reason, the response is coming back nil. If I try the right URL, a JSON will be returned and all the nodes filled out. I am getting these error codes 08338191624 , 8338191624 So I'm trying to get the error inside the if let error = error { but even putting a breaking point in there, the code is never reached. What am I doing wrong ? func getProductById(productId: Int, completion: @escaping (ProductModel) -> ()) { guard let url = URL(string: "https://mysite/api/products/82") else { return } var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json; charset=UTF-8", forHTTPHeaderField: "Content-Type") URLSession.shared.dataTask(with: request) { (data, request, error) in if let data = data { print("data") } if let error = error { print("error") } guard let data = data else { return } do { let product = try! JSONDecoder().decode(ProductModel.self, from: data) DispatchQueue.main.async { completion(product) } } catch { print(error) } } .resume()
Posted
by
Post not yet marked as solved
0 Replies
221 Views
Is there any way to get the following pieces of information from a downloaded report ( can obviously get this from looking at appstoreconnect but I want to get it in an automated way.) Total subscriber count for a specific date Exact payment made to the bank account for a certain month Thanks
Posted
by
Post not yet marked as solved
1 Replies
423 Views
We are getting a lot of feedback from our testers through TestFlight. It's super tedious to put the feedback into our project management tool (Linear). I was wondering if there is an API to fetch feedback from App Store Connect?
Posted
by
Post not yet marked as solved
2 Replies
550 Views
The docs here: https://developer.apple.com/documentation/appstoreconnectapi/certificatetype Imply that you can create a certificate with a certificateType of PASS_TYPE_ID_WITH_NFC or PASS_TYPE_ID. However, when using the API, I get a 404 or a 403 status code when attempting to use them. Additionally, there is no documented way to associate the certificate to a particular bundle id for the pass type. Has anyone been able to successfully create a certificate for passes? If so what request did you send?
Posted
by