majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.76k stars 487 forks source link

failed to download file: license is required #159

Closed JoanLeeo closed 1 year ago

JoanLeeo commented 1 year ago

To resolve this error, First, you can try downloading the app from the App Store using your Apple ID. Then, you can use ipatool to download it again.

majd commented 1 year ago

You can use the --purchase flag with the download command to obtain a license. You can also use the purchase command to do that.

trevor-e commented 1 year ago

For what it's worth I'm seeing this failure happen intermittently and I'm downloading with the --purchase flag included. If I wait several hours after the error then I'm successfully able to download the app, so maybe this is some form of rate-limiting.

davipt commented 1 year ago

FYI Apple's billing system is limited to 300 purchases per 24 hours. When using the tool (or the APIs directly), the purchase command (even free apps must be purchased) will return a successful purchase response but when the app is attempted to be downloaded the store API returns that the license does not exist. After 24 hours it's again possible to purchase additional apps. There is no throttling on already purchased apps. Even if the account is throttled to purchase new apps, it's still possible to download updates from previously purchased apps during those 24 hours. I haven't figured out a way to distinguish between this throttling and a legit error when downloading a non-purchased app. Hope this helps.

fersilentt commented 1 year ago

The solution that worked for me was

  1. Run the purchase command ipatool purchase -b com.google.photos

It should show an output like the following 8:30AM INF success=true

  1. Then we download the application ipatool download -b com.google.photos --purchase