Hey @slindauer,
Thanks for posting this on the forums!
Would it be possible for you to share the link to the specific App Store Connect API that you are using? I would like to try and re-create the error that you are experiencing. Below are some items that would be helpful to know:
Do you have a sample body to share?
What permission does your API Key have?
Are you including a scope in your Token?
I am also running into a similar error, and posted on the Apple Developer Forums at the below location.
https://forums.developer.apple.com/forums/thread/758518
With the same API Key that I receive an error for above, I am able to use the Submit an App for Beta Review API without encountering any issues.
https://developer.apple.com/documentation/appstoreconnectapi/submit_an_app_for_beta_review
Hopefully this helps and happy coding!
Post
Replies
Boosts
Views
Activity
Hello @Developer Program Support,
Thanks so much for reaching out on this! A Feedback has been filed with the below ID.
FB14060760
Inside of the Feedback I have provided the trace API logs along with all of the header information so that hopefully the correlation ID can be used to track down what is going on internally.
Let me know if there is anything additional that I can share to be helpful within the Feedback.
Thanks for looking into this and happy coding!
Hello @finnelliott,
Thanks so much for posting this question on the Apple Developer Forums!
You are certainly facing a challenge that is not unique in nature, but hard to manage at scale.
Just to make sure that the nature of your question is clearly understood. The customers that you are working with in regulated industries, or expect to be working with, do not already have an Apple Developer Organizational Account that can be leveraged and you are specifically looking for guidance around how to handle this type of situation?
Thanks in advance for the clarification and happy coding!
Hey @brickbogh,
Thanks for posting this question on the Apple Developer Forums!
I have also been unable to find any resources on how to get started with the discussed Enterprise API. I filed the below Feedback asking for additional information on when it would be made available and where the documentation will be hosted.
FB14080042
The Enterprise API is also referenced in the Apple Seed for IT program if you have access to it inside of the "What's New for IT" documentation, but there is only a single paragraph of information with no technical information.
Hopefully this shows up soon so that developers can start using it!
Happy coding!
Hey @caleach,
Great question here!
I am a very large user of the "Download Sales and Trends Reports" API as documented below and I make many requests every day.
https://developer.apple.com/documentation/appstoreconnectapi/download_sales_and_trends_reports
While I have not experienced what you have experienced (I am also not looking at the data for the same reasons), I have experienced times where the data coming from Apple has "disappeared" and the API has stopped making the data available even though it was previously available and the API returns different flavors of a 403 response with no data.
When this has happened, I have taken all of my requests and logs, opened up a Feedback with Apple, and then eventually the team was able to resolve the reporting issue and data flowed freely for the dates that had "disappeared".
Sales Reports and Finance Reports can be tricky as well with all of the variables that go into what makes a unique purchase while also respecting the privacy of users. If you have questions about your sales, I would recommend contacting Apple Developer Support and requesting a consultation on the finance reports to help understand why you are seeing the differences.
It could be that Apple themselves caught a reporting miss and corrected it which is great if thats what happened.
Not an answer, but hopefully this helps and happy coding!
Hello @gizumon,
Thanks for posting this question on the Apple Developer Forums!
Since the data you are looking for is "public" data, it is not necessary to purchase an Apple Developer Account to attain this information. However, I can confirm that as of today, you cannot use the App Store Connect API to collect App Review information about an application that you do not own. The information provided by the API is much more inclusive than that made available publicly.
With that being said, you can still get the data you are looking for by using the RSS feeds that Apple makes available. An example of one is below returning JSON, but XML is supported as well.
https://itunes.apple.com/[Territory]/rss/customerreviews/id=[AppleAppID]/sortby=mostrecent/json
Depending on how complex of a solution you are looking for, you will need to build a fully dynamic solution that supports territory localization along with pagination while not making so many requests that Apple services start to rate limit you. The availability of the service is not clearly documented in any one location and by looking online for the above URL scheme you will find many posters sharing their experience interacting with the endpoint.
Hopefully this helps and happy coding!
Hey @secretchimp,
Thanks so much for posting this question! If you were to search the Apple Developer Forums for this capability, you would find years worth of requests for Apple to support this capability with not much interaction from Apple. Today, I don't know of a formal solution that exists from Apple for managing Enterprise content programmatically.
To get to the crux of your question, the solution today is to continue to use Fastlane or another solution that is leveraging the same approach.
However, we live in a world of technology, so there are many paths to take that could potentially speed up your workflow. I will go into some of them, but each organization will need to determine what works best for them.
As your organization continues to scale, I strongly recommend continuing to look at Custom Apps. I work at a large organization with hundreds of applications and there will never be a "right" time to make the move, but Custom Apps serves the organization better in a few key areas.
You no longer need to maintain your own infrastructure to make internal software available and provide updates. Apple does all of this for you for $100 a year. I don't know of another service where this is possible.
You get access to the API that does what you are looking to do and then some.
You do not need to respond to OS code signature changes for "stale" applications. When Apple updates the code signature minimum, you don't need to update your applications, the App Store does this for you.
Most importantly, you do not need to resign your applications on an annual basis or even create new certificates or provisioning profiles. Apple does all of this for you.
If all of your developers have the same requirements to meet while developing applications (Enterprise applications are the Wild West), and it is the same model that is used by the talent pool you are hiring from, collaboration and cross training becomes much easier.
Specifically regarding your challenge with internal applications and systems that live behind firewalls, these are all good things to bring up to Apple and request improvements to the App Review Guidelines. The App Review Guidelines do indicate that a fully featured demo mode is acceptable.
Provide App Review with full access to your app. If your app includes account-based features, provide either an active demo account or fully-featured demo mode, plus any other hardware or resources that might be needed to review your app (e.g. login credentials or a sample QR code)
Consider moving your development work to an Apple Developer Account instead of an Apple Developer Enterprise Account. By doing this, you once again gain access to the API and can automate more of your workflows. Doing this would also set you up for long term success in the event that you do migrate to Custom Apps. There is no difference in the development capabilities between an Apple Developer Program and Apple Developer Enterprise Program in terms of numbers of devices and profiles, so you could leverage Fastlane to create two artifacts instead of one and then only need to manage your "Universal Distribution" profile once a year (or at the rate you deem necessary based off user behavior and device management capabilities).
Many development tasks including running applications on devices no longer require a paid Apple Developer Account. Investigating whether or not your applications require a paid Apple Developer Account, and whether or not they are using Apple ecosystem services may reveal that with the proper Xcode project configuration, the majority of your developers can be working on software development while not needing to be on a team account and instead can leverage free personal accounts.
One of the possibilities above may help, or you may find another that can do so much more for your organization, but hopefully you can find something that further enables you in both the short and long run setting you up for continued success!
Hopefully this helps and happy coding!
Hello @bwalpoleuk,
Thanks so much for posting on the developer forums!
In order for the community to help you, would it be possible for you to share some of the below information?
What permissions do the API Keys in question have that appear to have stopped working?
What scope are you using when creating the JWT for each permission type?
Can you share links to the App Store Connect APIs that you are using the API Keys with?
If you are using filters, it would be good to know what filters you are using, not their values so that we can do accurate testing.
Can you provide example error response body information (removing sensitive information) so that we can parse the error information?
Apple does have a method for "Revoking API Keys" which is documented at the below URL.
https://developer.apple.com/documentation/appstoreconnectapi/revoking_api_keys
Hopefully this is helpful and looking forward to seeing more information so that the community can help!
Hello @MateusFonseca ,
You indicate that you are an "Admin" and that the Organization Account has accepted the Terms of Service, but your "Account Holder" (same person who accepts Terms of Service) will also need to request access to the App Store Connect API. Has your Account Holder already requested access and gained approval?
References:
https://developer.apple.com/forums/thread/110531
https://developer.apple.com/help/app-store-connect/get-started/app-store-connect-api/
Hopefully this helps and happy coding!
Hey @Alberto_C_Solo,
Thanks so much for positing this question on the forums!
After reviewing the code that you have shared (thank you for doing so!), I am not sure if it could be this simple, but it looks like the URL that you are using when interacting with the App Store Connect API could be wrong. Below is what you have listed in your code example above:
https://appstoreconnect.apple.com/analytics/api/v1/salesReports
Below is the URL that I am using when interacting with the App Store Connect API and I am not running into issues while retrieving sales data.
https://api.appstoreconnect.apple.com/v1/salesReports
I did test this on my side and when I hit the API with the URL that you are using I am encountering the same error.
Would it be possible to test using the different base URL and determining if this resolves your issue?
Hopefully this helps and happy coding!
Hello @UtkarshDevAcc,
This is a great question and I wish I would have seen it sooner! When I read your question, I actually see two questions.
How many downloads have their been of my application since it has been launched on the App Store?
How many installs exist of my application?
The first question we can easily answer with the App Store Connect API. The second question we are unable to answer with the App Store Connect API or any other Apple provided technologies that I am personally aware of. I believe this is due to "install" and "usage" information being opt-in information. I have tried to do a statistical analysis of the opt-in data available and have talked to Apple during WWDC about this, but a third party solution would be a better tool to answer this question.
In regards to how many downloads your application has, you can capture this information using the below App Store Connect API.
https://developer.apple.com/documentation/appstoreconnectapi/download_sales_and_trends_reports
Specifically, there are two loops that you may want to introduce based off the information you are looking to achieve. Apple currently provides this data in daily, weekly, monthly and annual cadences. Apple will only provide daily, weekly, and monthly data for the previous year (rolling), which after that only annual reports are available.
The simplest two loops to implement would be a loop over the previous 366 days (accounting for leap year) and the last X number of years. I personally use 366 intentionally because I have noticed a few times where App Store Sales data for a specific date, or date range is unavailable and I want to capture the previous years worth of data. I would also suggest setting a max on the annual loop you would have running to go back in years and hardcode the first year you published an application so that you can take advantage of the same logic in the daily loop.
One thing to note is that this approach will download ALL application data for an Apple Developer Account, and then you can use a data analysis tool or additional coding to break it apart for each application.
Hopefully this helps and happy coding!
Hello @blackvision,
Thanks for posting on the Apple Developer Forums!
When you say "command line tools", is there a specific command line tool that you are referring to? Maybe something included in the Xcode Command Line tools?
From what I have been able to find in the Apple documentation, I have not found a way to create an API Key outside of the web interface. If I understand your question, what you are essentially asking for is an API Key that can generate additional API Keys. While Apple can introduce a new service at any time, I cant think of another existing Apple service with this model as it does not fall within their current authentication model.
However, it might be worth looking into something like what this other poster on the forums is doing.
https://developer.apple.com/forums/thread/707271
In this post they are dynamically creating JWTs with an expiration that can be provided to other teams and have specific scopes set for the applications they may be responsible for or the resources they would like for the end user to have access to. This certainly would not solve ALL of the challenges of being able to hand out an API Key itself, but building a proxy service for authentication internally would be more secure and provide better flexibility in the long run if you are needing to have managed access.
One thing that I try to remind myself of when providing authentication information to users for Apple resources is that there are no logs of who did what or when which is the biggest driver for building a proxy service to control access instead of providing authentication information directly. Just some ideas even though I know this does not directly answer your question.
Hopefully this helps and happy coding!
Hello @Lamyae,
Thank you for positing on the Apple Developer Forums!
While this is not possible today with the App Store Connect API, Apple did announce at WWDC 2022 that this will be a supported feature in the near future. They talk about this in the below WWDC session.
https://developer.apple.com/videos/play/wwdc2022/10043/?time=424
I have not been able to find any specific details about the API or what interactions will be enabled, but we know it will eventually find its way into our hands. Version 2.0 of the App Store Connect API will be available "Later this summer." based off of the information from Apple.
Hopefully this helps and happy coding!
Hey @huanling820713,
Would it be possible for you to share the steps you are taking for signing and notarization? This will help us break down what is happening after the build (assuming the application works at this point) that could be modifying the application contents and then we can look at whether or not the steps you are taking to sign are being trusted by the OS.
While I sign mostly DMG files, I think you should be able to run the below command on your signed file to determine if it is trusted, but this is only checking your high level signing and not whether or not Gatekeeper trusts you at this point.
codesign -dv --deep --verbose=4 /Path/To/File
@eskimo also has a great post that I skimmed over at the below URL and certainly looks like a good read to help you troubleshoot!
https://developer.apple.com/forums/thread/128166
Hopefully this helps and happy coding!
Hey @Efun,
Thanks for posting your question on the Apple Developer Forums!
After watching the announcement, I am not 100% sure that I know what this is so hopefully you will get some other responses from the community!
Without the App Store Connect API, the only way that I knew to get content uploaded to Apple was through the Transporter tool. Below is the first of many links to Transporter.
https://help.apple.com/itc/transporteruserguide/en.lproj/static.html
Transporter was not an application at first but a CLI agent that you installed on your machine to assist in the delivery of content. Over time, Apple is constantly attempting to make it easier for developers to get work done so they eventually released the Transporter application.
https://apps.apple.com/app/transporter/id1450874784
Transporter is mostly used from my experience by teams who would like a GUI instead of using the Terminal and altool for uploading IPA files to Apple.
Anyways, Transporter also enables the uploading of any large number of content to Apple and the services they host. Nested inside of the Transporter documentation under the Apps section, you will find a link to the App Metadata Specification.
https://help.apple.com/asc/appsspec/
I will let you go through and read the full specification if you would like, but transporter leverages an XML style communication pattern when delivering content to Apple. An example of this can be found in the documentation at the below URL.
https://help.apple.com/asc/appsspec/#/itc39ebbd83d
While I am not 100% sure this is what they are talking about in the App Store Connect video, this is the most prominent location that I can think of where XML data is used to upload content to App Store Connect outside of the REST API.
Hopefully this helps and happy coding!