Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Login icloud via bash script

Hey all,


So I need to login to iCloud via a bash script for automated testing purposes. Does anybody know if this is possible to do? I have been unable to find any documentation on doing so.

MacBook Pro, iOS 11

Posted on Mar 15, 2018 5:01 PM

Reply
2 replies

Mar 15, 2018 7:09 PM in response to DespairBear123

You can open an icloud.com login screen from the Terminal in a one-liner, but two hurdles immediately face you:

  1. Entering the Apple ID, and password in a web form
  2. How to deal with the two-step verification code challenge and code entry following item 1.


From the command-line:


osascript -e "tell application \"Safari\" to open location \"icloud.com\""

Login icloud via bash script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.