From 87d3394e2075f98a0cbda891fc8126a78291f95d Mon Sep 17 00:00:00 2001 From: scaraebeus <36857540+scaraebeus@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:35:40 -0800 Subject: [PATCH] Authentication Fix: Merge updated auth flow from pyicloud (#734) * Merged updated auth flow from pyicloud - including 2FA. Retain Library and Domain support. * Update authentication.py to use 2FA * Fix AttributeError trying to use 'get' on Response object * Cleanup unused imports. Updated a couple incorrect references from 'apple_id' to 'accountName' * Tests: Updated 2 VCR's for better underatanding of further necessary updates. * icloudpd: Fix: No password provided or in keyring now prompts correctly icloudpd: Refactor: 2SA prompt requires device selection to send code icloudpd: Feat: New --auth-only flag to trigger log in, 2SA/2FA, and set session/cookie file. Future log in will validate the tokens without running through full signin flow. Can be used to validate the session tokens are still good without having to ping the photo endpoints. pyicloud_ipd: Clean: Removed unused imports pyicloud_ipd: Fix: Capture additional header data pyicloud_ipd: Fix: Invalid Username/Password correctly caught now pyicloud_ipd: Fix: Changes in certain error responses now captured pyicloud_ipd: Fix: Bypass 2sv/trust when using 2SA Tests: Refactored authentication tests Tests: Refactored two_step_auth tests (TODO: Add 2FA tests) Tests: Updated/Created additional VCRs for auth tests * Tests: authentication and two_step_auth tests now pass * icloudpd: Fix: Correct exception reference for API error pyicloud_ipd: Fix: Correct exception reference for API and NoStoredPassword errors Tests: Refactor: All remaining tests now pass Tests: Refactor: Update corresponding VCRs for new auth flow Tests: Cookie/Session files stored in individual test fixtures for running tests independently * icloudpd: Fix: Update exception reference icloudpd: Style: Format update (scripts/format) * fix: Update pyicloud_ipd/cmdline.py to use 2FA (in addition to 2SA) docs: Update CHANGELOG.md and README.md --- CHANGELOG.md | 3 + README.md | 12 +- src/icloudpd/authentication.py | 48 +- src/icloudpd/base.py | 88 +- src/icloudpd/download.py | 10 +- src/icloudpd/email_notifications.py | 2 +- src/icloudpd/exif_datetime.py | 2 +- src/pyicloud_ipd/base.py | 586 ++++++++--- src/pyicloud_ipd/cmdline.py | 188 ++-- src/pyicloud_ipd/exceptions.py | 48 +- src/pyicloud_ipd/services/photos.py | 8 +- src/pyicloud_ipd/utils.py | 9 +- tests/test_authentication.py | 126 ++- tests/test_autodelete_photos.py | 202 ++-- tests/test_cli.py | 39 +- tests/test_download_live_photos.py | 74 +- tests/test_download_photos.py | 562 +++++++---- tests/test_email_notifications.py | 48 +- tests/test_folder_structure.py | 60 +- tests/test_listing_albums.py | 10 +- tests/test_listing_libraries.py | 23 +- tests/test_listing_recent_photos.py | 85 +- tests/test_two_step_auth.py | 193 ++-- tests/vcr_cassettes/2fa_flow_invalid_code.yml | 177 ++++ tests/vcr_cassettes/2fa_flow_valid_code.yml | 323 ++++++ tests/vcr_cassettes/2sa_flow_invalid_code.yml | 237 +++++ .../vcr_cassettes/2sa_flow_invalid_device.yml | 137 --- tests/vcr_cassettes/2sa_flow_valid_code.yml | 348 +++++++ tests/vcr_cassettes/2sa_flow_valid_device.yml | 935 ------------------ tests/vcr_cassettes/auth_requires_2fa.yml | 100 ++ tests/vcr_cassettes/auth_requires_2sa.yml | 37 - tests/vcr_cassettes/autodelete_photos.yml | 626 ++++++++++-- .../download_autodelete_photos.yml | 799 ++++++++++++--- tests/vcr_cassettes/download_live_photos.yml | 285 +++--- tests/vcr_cassettes/failed_auth.yml | 65 +- tests/vcr_cassettes/listing_albums.yml | 272 +++-- tests/vcr_cassettes/listing_photos.yml | 165 +++- .../listing_photos_bad_filename.yml | 165 +++- .../listing_photos_missing_downloadUrl.yml | 163 ++- .../listing_photos_missing_filenameEnc.yml | 163 ++- .../listing_photos_no_delete.yml | 163 ++- tests/vcr_cassettes/successful_auth.yml | 111 ++- 42 files changed, 5045 insertions(+), 2652 deletions(-) create mode 100644 tests/vcr_cassettes/2fa_flow_invalid_code.yml create mode 100644 tests/vcr_cassettes/2fa_flow_valid_code.yml create mode 100644 tests/vcr_cassettes/2sa_flow_invalid_code.yml delete mode 100644 tests/vcr_cassettes/2sa_flow_invalid_device.yml create mode 100644 tests/vcr_cassettes/2sa_flow_valid_code.yml delete mode 100644 tests/vcr_cassettes/2sa_flow_valid_device.yml create mode 100644 tests/vcr_cassettes/auth_requires_2fa.yml delete mode 100644 tests/vcr_cassettes/auth_requires_2sa.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 905769ece..47c6842b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Unreleased - fix: macos binary failing [#668](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/668) [#700](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/700) +- fix: 'Invalid email/password combination' exception due to recent iCloud changes [#729](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/729) +- feature: `--auth-only` parameter to independently create/validate session tokens without listing/downloading photos +- feature: 2FA validation merged from `pyicloud` ## 1.16.3 (2023-12-04) diff --git a/README.md b/README.md index 31e7dc8d6..164783361 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ There are three ways to run `icloudpd`: - One time download and an option to monitor for iCloud changes continuously (`--watch-with-interval` option) - Optimizations for incremental runs (`--until-found` and `--recent` options) - Photo meta data (EXIF) updates (`--set-exif-datetime` option) -- ... and many (use `--help` option to get full list) +- ... and many more (use `--help` option to get full list) ## Experimental Mode @@ -39,7 +39,15 @@ To keep your iCloud photo collection synchronized to your local system: icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -Synchronization logic can be adjusted with command-line parameters. Run `icloudpd --help` to get full list. +- Synchronization logic can be adjusted with command-line parameters. Run `icloudpd --help` to get full list. + +To independently create and authorize a session (and complete 2SA/2FA validation if needed) on your local system: + +``` +icloudpd --username my@email.address --password my_password --auth-only +``` + +- This feature can also be used to check and verify that the session is still authenticated. ## FAQ diff --git a/src/icloudpd/authentication.py b/src/icloudpd/authentication.py index e92ea4355..d0cc87542 100644 --- a/src/icloudpd/authentication.py +++ b/src/icloudpd/authentication.py @@ -35,17 +35,26 @@ def authenticate_( client_id=client_id, ) break - except pyicloud_ipd.exceptions.NoStoredPasswordAvailable: + except pyicloud_ipd.exceptions.PyiCloudNoStoredPasswordAvailableException: # Prompt for password if not stored in PyiCloud's keyring password = click.prompt("iCloud Password", hide_input=True) - if icloud.requires_2sa: + if icloud.requires_2fa: if raise_error_on_2sa: raise TwoStepAuthRequiredError( "Two-step/two-factor authentication is required" ) - logger.info("Two-step/two-factor authentication is required") + logger.info("Two-step/two-factor authentication is required (2fa)") + request_2fa(icloud, logger) + + elif icloud.requires_2sa: + if raise_error_on_2sa: + raise TwoStepAuthRequiredError( + "Two-step/two-factor authentication is required" + ) + logger.info("Two-step/two-factor authentication is required (2sa)") request_2sa(icloud, logger) + return icloud return authenticate_ @@ -65,25 +74,17 @@ def request_2sa(icloud: pyicloud_ipd.PyiCloudService, logger: logging.Logger): device.get("phoneNumber")))) # pylint: enable-msg=consider-using-f-string - # pylint: disable-msg=superfluous-parens - print(f" {devices_count}: Enter two-factor authentication code") - # pylint: enable-msg=superfluous-parens device_index = click.prompt( "Please choose an option:", default=0, type=click.IntRange( 0, - devices_count)) + devices_count - 1)) - if device_index == devices_count: - # We're using the 2FA code that was automatically sent to the user's device, - # so can just use an empty dict() - device = {} - else: - device = devices[device_index] - if not icloud.send_verification_code(device): - logger.error("Failed to send two-factor authentication code") - sys.exit(1) + device = devices[device_index] + if not icloud.send_verification_code(device): + logger.error("Failed to send two-factor authentication code") + sys.exit(1) code = click.prompt("Please enter two-factor authentication code") if not icloud.validate_verification_code(device, code): @@ -96,3 +97,18 @@ def request_2sa(icloud: pyicloud_ipd.PyiCloudService, logger: logging.Logger): "the two-step authentication expires.\n" "(Use --help to view information about SMTP options.)" ) + + +def request_2fa(icloud: pyicloud_ipd.PyiCloudService, logger: logging.Logger): + """Request two-factor authentication.""" + code = click.prompt("Please enter two-factor authentication code") + if not icloud.validate_2fa_code(code): + logger.error("Failed to verify two-factor authentication code") + sys.exit(1) + logger.info( + "Great, you're all set up. The script can now be run without " + "user interaction until 2SA expires.\n" + "You can set up email notifications for when " + "the two-step authentication expires.\n" + "(Use --help to view information about SMTP options.)" + ) diff --git a/src/icloudpd/base.py b/src/icloudpd/base.py index bf5c299b0..160b1024a 100644 --- a/src/icloudpd/base.py +++ b/src/icloudpd/base.py @@ -19,7 +19,7 @@ from tzlocal import get_localzone from pyicloud_ipd import PyiCloudService -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException from pyicloud_ipd.services.photos import PhotoAsset from icloudpd.authentication import authenticator, TwoStepAuthRequiredError @@ -55,6 +55,11 @@ "(default: use PyiCloud keyring or prompt for password)", metavar="", ) +@click.option( + "--auth-only", + help="Create/Update cookie and session tokens only.", + is_flag=True, +) @click.option( "--cookie-directory", help="Directory to store cookies for authentication " @@ -136,13 +141,12 @@ + "(Does not download or delete any files.)", is_flag=True, ) -@click.option( - "--folder-structure", - help="Folder structure (default: {:%Y/%m/%d}). " - "If set to 'none' all photos will just be placed into the download directory", - metavar="", - default="{:%Y/%m/%d}", -) +@click.option("--folder-structure", + help="Folder structure (default: {:%Y/%m/%d}). " + "If set to 'none' all photos will just be placed into the download directory", + metavar="", + default="{:%Y/%m/%d}", + ) @click.option( "--set-exif-datetime", help="Write the DateTimeOriginal exif tag from file creation date, " + @@ -235,7 +239,8 @@ is_flag=True, default=False, ) -# a hacky way to get proper version because automatic detection does not work for some reason +# a hacky way to get proper version because automatic detection does not +# work for some reason @click.version_option(version="1.16.3") # pylint: disable-msg=too-many-arguments,too-many-statements # pylint: disable-msg=too-many-branches,too-many-locals @@ -243,6 +248,7 @@ def main( directory: Optional[str], username: Optional[str], password: Optional[str], + auth_only: bool, cookie_directory: str, size: str, live_photo_size: str, @@ -299,15 +305,17 @@ def main( with logging_redirect_tqdm(): # check required directory param only if not list albums - if not list_albums and not list_libraries and not directory: - print('--directory, --list-libraries or --list-albums are required') + if not list_albums and not list_libraries and not directory and not auth_only: + print( + '--auth-only, --directory, --list-libraries or --list-albums are required') sys.exit(2) if auto_delete and delete_after_download: print('--auto-delete and --delete-after-download are mutually exclusive') sys.exit(2) - if watch_with_interval and (list_albums or only_print_filenames): # pragma: no cover + if watch_with_interval and ( + list_albums or only_print_filenames): # pragma: no cover print( '--watch_with_interval is not compatible with --list_albums, --only_print_filenames' ) @@ -326,10 +334,13 @@ def main( set_exif_datetime, skip_live_photos, live_photo_size, - dry_run) if directory is not None else (lambda _s: lambda _c, _p: False), + dry_run) if directory is not None else ( + lambda _s: lambda _c, + _p: False), directory, username, password, + auth_only, cookie_directory, size, recent, @@ -355,9 +366,7 @@ def main( domain, logger, watch_with_interval, - dry_run - ) - ) + dry_run)) # pylint: disable-msg=too-many-arguments,too-many-statements @@ -377,7 +386,8 @@ def download_builder( live_photo_size: str, dry_run: bool) -> Callable[[PyiCloudService], Callable[[Counter, PhotoAsset], bool]]: """factory for downloader""" - def state_(icloud: PyiCloudService) -> Callable[[Counter, PhotoAsset], bool]: + def state_( + icloud: PyiCloudService) -> Callable[[Counter, PhotoAsset], bool]: def download_photo_(counter: Counter, photo: PhotoAsset) -> bool: """internal function for actually downloading the photos""" filename = clean_filename(photo.filename) @@ -507,17 +517,14 @@ def download_photo_(counter: Counter, photo: PhotoAsset) -> bool: ) download_result = download.download_media( - logger, dry_run, icloud, photo, download_path, download_size - ) + logger, dry_run, icloud, photo, download_path, download_size) success = download_result if download_result: - if not dry_run and \ - set_exif_datetime and \ - clean_filename(photo.filename) \ - .lower() \ - .endswith((".jpg", ".jpeg")) and \ - not exif_datetime.get_photo_exif(logger, download_path): + if not dry_run and set_exif_datetime and clean_filename( + photo.filename) .lower() .endswith( + (".jpg", ".jpeg")) and not exif_datetime.get_photo_exif( + logger, download_path): # %Y:%m:%d looks wrong, but it's the correct format date_str = created_date.strftime( "%Y-%m-%d %H:%M:%S%z") @@ -582,8 +589,7 @@ def download_photo_(counter: Counter, photo: PhotoAsset) -> bool: truncated_path ) download_result = download.download_media( - logger, dry_run, icloud, photo, lp_download_path, lp_size - ) + logger, dry_run, icloud, photo, lp_download_path, lp_size) success = download_result and success if download_result: logger.info( @@ -595,7 +601,10 @@ def download_photo_(counter: Counter, photo: PhotoAsset) -> bool: return state_ -def delete_photo(logger: logging.Logger, icloud: PyiCloudService, photo: PhotoAsset): +def delete_photo( + logger: logging.Logger, + icloud: PyiCloudService, + photo: PhotoAsset): """Delete a photo from the iCloud account.""" clean_filename_local = clean_filename(photo.filename) logger.debug( @@ -626,7 +635,10 @@ def delete_photo(logger: logging.Logger, icloud: PyiCloudService, photo: PhotoAs "Deleted %s in iCloud", clean_filename_local) -def delete_photo_dry_run(logger: logging.Logger, _icloud: PyiCloudService, photo: PhotoAsset): +def delete_photo_dry_run( + logger: logging.Logger, + _icloud: PyiCloudService, + photo: PhotoAsset): """Dry run for deleting a photo from the iCloud""" logger.info( "[DRY RUN] Would delete %s in iCloud", @@ -706,6 +718,7 @@ def core( directory: Optional[str], username: Optional[str], password: Optional[str], + auth_only: bool, cookie_directory: str, size: str, recent: Optional[int], @@ -764,6 +777,10 @@ def core( ) return 1 + if auth_only: + logger.info("Authentication completed successfully") + return 0 + download_photo = downloader(icloud) # Access to the selected library. Defaults to the primary photos object. @@ -788,7 +805,7 @@ def core( logger.error("Unknown library: %s", library) return 1 photos = library_object.albums[album] - except PyiCloudAPIResponseError as err: + except PyiCloudAPIResponseException as err: # For later: come up with a nicer message to the user. For now take the # exception text logger.error("error?? %s", err) @@ -816,8 +833,8 @@ def core( logger, icloud) internal_error_handler = internal_error_handle_builder(logger) - error_handler = compose_handlers([session_exception_handler, internal_error_handler - ]) + error_handler = compose_handlers( + [session_exception_handler, internal_error_handler]) photos.exception_handler = error_handler @@ -863,7 +880,7 @@ def core( video_suffix = " and videos" if not skip_videos else "" logger.info( ("Downloading %s %s" + - " photo%s%s to %s ..."), + " photo%s%s to %s ..."), photos_count_str, size, plural_suffix, @@ -883,8 +900,7 @@ def should_break(counter: Counter) -> bool: if should_break(consecutive_files_found): logger.info( "Found %s consecutive previously downloaded photos. Exiting", - until_found - ) + until_found) break item = next(photos_iterator) if download_photo( @@ -907,7 +923,7 @@ def delete_cmd(): if auto_delete: autodelete_photos(logger, dry_run, library_object, - folder_structure, directory) + folder_structure, directory) if watch_interval: # pragma: no cover logger.info(f"Waiting for {watch_interval} sec...") diff --git a/src/icloudpd/download.py b/src/icloudpd/download.py index f074ff678..bfdd53d3f 100644 --- a/src/icloudpd/download.py +++ b/src/icloudpd/download.py @@ -6,9 +6,9 @@ import time import datetime from tzlocal import get_localzone -from requests.exceptions import ConnectionError # pylint: disable=redefined-builtin +from requests.exceptions import ConnectionError # pylint: disable=redefined-builtin import pyicloud_ipd # pylint: disable=redefined-builtin -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException from pyicloud_ipd.services.photos import PhotoAsset # Import the constants object so that we can mock WAIT_SECONDS in tests @@ -52,7 +52,9 @@ def mkdirs_for_path(logger: logging.Logger, download_path: str) -> bool: return False -def mkdirs_for_path_dry_run(logger: logging.Logger, download_path: str) -> bool: +def mkdirs_for_path_dry_run( + logger: logging.Logger, + download_path: str) -> bool: """ DRY Run for Creating hierarchy of folders for file path """ download_dir = os.path.dirname(download_path) if not os.path.exists(download_dir): @@ -123,7 +125,7 @@ def download_media( ) break - except (ConnectionError, socket.timeout, PyiCloudAPIResponseError) as ex: + except (ConnectionError, socket.timeout, PyiCloudAPIResponseException) as ex: if "Invalid global session" in str(ex): logger.error( "Session error, re-authenticating...") diff --git a/src/icloudpd/email_notifications.py b/src/icloudpd/email_notifications.py index 7cd85cdc2..170c96607 100644 --- a/src/icloudpd/email_notifications.py +++ b/src/icloudpd/email_notifications.py @@ -16,7 +16,7 @@ def send_2sa_notification( smtp_port: int, smtp_no_tls: bool, to_addr: Optional[str], - from_addr: Optional[str]=None): + from_addr: Optional[str] = None): """Send an email notification when 2SA is expired""" to_addr = cast(str, to_addr if to_addr is not None else smtp_email) from_addr = from_addr if from_addr is not None else ( diff --git a/src/icloudpd/exif_datetime.py b/src/icloudpd/exif_datetime.py index e44df2876..74040c287 100644 --- a/src/icloudpd/exif_datetime.py +++ b/src/icloudpd/exif_datetime.py @@ -6,7 +6,7 @@ from piexif._exceptions import InvalidImageDataError -def get_photo_exif(logger: logging.Logger, path:str): +def get_photo_exif(logger: logging.Logger, path: str): """Get EXIF date for a photo, return nothing if there is an error""" try: exif_dict = piexif.load(path) diff --git a/src/pyicloud_ipd/base.py b/src/pyicloud_ipd/base.py index a387a655b..736a4796d 100644 --- a/src/pyicloud_ipd/base.py +++ b/src/pyicloud_ipd/base.py @@ -1,22 +1,19 @@ -import six -import uuid -import hashlib +from uuid import uuid1 import inspect import json import logging -import requests -import sys -import tempfile -import os +from requests import Session +from tempfile import gettempdir +from os import path, mkdir from re import match -import urllib3 +import http.cookiejar as cookielib +import getpass from pyicloud_ipd.exceptions import ( - PyiCloudConnectionException, PyiCloudFailedLoginException, - PyiCloudAPIResponseError, - PyiCloud2SARequiredError, - PyiCloudServiceNotActivatedErrror + PyiCloudAPIResponseException, + PyiCloud2SARequiredException, + PyiCloudServiceNotActivatedException, ) from pyicloud_ipd.services import ( FindMyiPhoneServiceManager, @@ -25,109 +22,192 @@ ContactsService, RemindersService, PhotosService, - AccountService + AccountService, ) from pyicloud_ipd.utils import get_password_from_keyring -if six.PY3: - import http.cookiejar as cookielib -else: - import cookielib +LOGGER = logging.getLogger(__name__) -logger = logging.getLogger(__name__) +HEADER_DATA = { + "X-Apple-ID-Account-Country": "account_country", + "X-Apple-ID-Session-Id": "session_id", + "X-Apple-Session-Token": "session_token", + "X-Apple-TwoSV-Trust-Token": "trust_token", + "X-Apple-TwoSV-Trust-Eligible": "trust_eligible", + "X-Apple-I-Rscd": "apple_rscd", + "X-Apple-I-Ercd": "apple_ercd", + "scnt": "scnt", +} class PyiCloudPasswordFilter(logging.Filter): def __init__(self, password): - self.password = password + super().__init__(password) def filter(self, record): message = record.getMessage() - if self.password in message: - record.msg = message.replace(self.password, "*" * 8) + if self.name in message: + record.msg = message.replace(self.name, "*" * 8) record.args = [] return True -class PyiCloudSession(requests.Session): +class PyiCloudSession(Session): + """iCloud session.""" + def __init__(self, service): self.service = service - super(PyiCloudSession, self).__init__() + super().__init__() - def request(self, *args, **kwargs): + def request(self, method, url, **kwargs): # pylint: disable=arguments-differ # Charge logging to the right service endpoint callee = inspect.stack()[2] module = inspect.getmodule(callee[0]) - logger = logging.getLogger(module.__name__).getChild('http') - if self.service._password_filter not in logger.filters: - logger.addFilter(self.service._password_filter) + request_logger = logging.getLogger(module.__name__).getChild("http") + if self.service.password_filter not in request_logger.filters: + request_logger.addFilter(self.service.password_filter) - logger.debug("%s %s %s", args[0], args[1], kwargs.get('data', '')) + request_logger.debug("%s %s %s", method, url, kwargs.get("data", "")) - try: - response = super(PyiCloudSession, self).request(*args, **kwargs) - except requests.exceptions.SSLError: - raise PyiCloudConnectionException("Error establishing secure connection. Try --domain parameter") + has_retried = kwargs.get("retried") + kwargs.pop("retried", None) + response = super().request(method, url, **kwargs) + + content_type = response.headers.get("Content-Type", "").split(";")[0] + json_mimetypes = ["application/json", "text/json"] + + request_logger.debug(response.headers) + + for header, value in HEADER_DATA.items(): + if response.headers.get(header): + session_arg = value + self.service.session_data.update( + {session_arg: response.headers.get(header)} + ) - content_type = response.headers.get('Content-Type', '').split(';')[0] - json_mimetypes = ['application/json', 'text/json'] + # Save session_data to file + with open(self.service.session_path, "w", encoding="utf-8") as outfile: + json.dump(self.service.session_data, outfile) + LOGGER.debug("Saved session data to file") + + # Save cookies to file + self.cookies.save(ignore_discard=True, ignore_expires=True) + LOGGER.debug("Cookies saved to %s", self.service.cookiejar_path) + + if not response.ok and ( + content_type not in json_mimetypes + or response.status_code in [421, 450, 500] + ): + try: + # pylint: disable=protected-access + fmip_url = self.service._get_webservice_url("findme") + if ( + has_retried is None + and response.status_code in [421, 450, 500] + and fmip_url in url + ): + # Handle re-authentication for Find My iPhone + LOGGER.debug("Re-authenticating Find My iPhone service") + try: + # If 450, authentication requires a full sign in to the account + service = None if response.status_code == 450 else "find" + self.service.authenticate(True, service) + + except PyiCloudAPIResponseException: + LOGGER.debug("Re-authentication failed") + kwargs["retried"] = True + return self.request(method, url, **kwargs) + except Exception: + pass + + if has_retried is None and response.status_code in [421, 450, 500]: + api_error = PyiCloudAPIResponseException( + response.reason, response.status_code, retry=True + ) + request_logger.debug(api_error) + kwargs["retried"] = True + return self.request(method, url, **kwargs) - if not response.ok and content_type not in json_mimetypes: self._raise_error(response.status_code, response.reason) if content_type not in json_mimetypes: + if self.service.session_data.get("apple_rscd") == "401": + code = "401" + reason = "Invalid username/password combination." + self._raise_error(code, reason) + return response try: - json = response.json() - except: - logger.warning('Failed to parse response with JSON mimetype') + data = response.json() + except: # pylint: disable=bare-except + request_logger.warning("Failed to parse response with JSON mimetype") return response - logger.debug(json) - - reason = json.get('errorMessage') - reason = reason or json.get('reason') - reason = reason or json.get('errorReason') - if not reason and isinstance(json.get('error'), six.string_types): - reason = json.get('error') - if not reason and json.get('error'): - reason = "Unknown reason" - - code = json.get('errorCode') - if not code and json.get('serverErrorCode'): - code = json.get('serverErrorCode') - - if reason: - self._raise_error(code, reason) + request_logger.debug(data) + + if isinstance(data, dict): + if data.get("hasError"): + errors = data.get("service_errors") + # service_errors returns a list of dict + # dict includes the keys: code, title, message, supressDismissal + # Assuming a single error for now + # May need to revisit to capture and handle multiple errors + code = errors[0].get("code") + reason = errors[0].get("message") + self._raise_error(code, reason) + elif not data.get("success"): + reason = data.get("errorMessage") + reason = reason or data.get("reason") + reason = reason or data.get("errorReason") + if not reason and isinstance(data.get("error"), str): + reason = data.get("error") + if not reason and data.get("error"): + reason = "Unknown reason" + + code = data.get("errorCode") + if not code and data.get("serverErrorCode"): + code = data.get("serverErrorCode") + if not code and data.get("error"): + code = data.get("error") + + if reason: + self._raise_error(code, reason) return response def _raise_error(self, code, reason): - if self.service.requires_2sa and \ - reason == 'Missing X-APPLE-WEBAUTH-TOKEN cookie': - raise PyiCloud2SARequiredError(response.url) - if code == 'ZONE_NOT_FOUND' or code == 'AUTHENTICATION_FAILED': - reason = 'Please log into https://icloud.com/ to manually ' \ - 'finish setting up your iCloud service' - api_error = PyiCloudServiceNotActivatedErrror(reason, code) - logger.error(api_error) - - raise(api_error) - if code == 'ACCESS_DENIED': - reason = reason + '. Please wait a few minutes then try ' \ - 'again. The remote servers might be trying to ' \ - 'throttle requests.' - - api_error = PyiCloudAPIResponseError(reason, code) - logger.error(api_error) + if ( + self.service.requires_2sa + and reason == "Missing X-APPLE-WEBAUTH-TOKEN cookie" + ): + raise PyiCloud2SARequiredException(self.service.user["accountName"]) + if code in ("ZONE_NOT_FOUND", "AUTHENTICATION_FAILED"): + reason = ( + "Please log into https://icloud.com/ to manually " + "finish setting up your iCloud service" + ) + api_error = PyiCloudServiceNotActivatedException(reason, code) + LOGGER.error(api_error) + + raise (api_error) + if code == "ACCESS_DENIED": + reason = ( + reason + ". Please wait a few minutes then try again." + "The remote servers might be trying to throttle requests." + ) + if code in [421, 450, 500]: + reason = "Authentication required for Account." + + api_error = PyiCloudAPIResponseException(reason, code) + LOGGER.error(api_error) raise api_error -class PyiCloudService(object): +class PyiCloudService: """ A base authentication class for the iCloud service. Handles the authentication required to access iCloud services. @@ -140,59 +220,80 @@ class PyiCloudService(object): def __init__( self, domain, apple_id, password=None, cookie_directory=None, verify=True, - client_id=None + client_id=None, with_family=True, ): if password is None: password = get_password_from_keyring(apple_id) + self.user = {"accountName": apple_id, "password": password} self.data = {} - self.client_id = client_id or str(uuid.uuid1()).upper() - self.user = {'apple_id': apple_id, 'password': password} + self.params = {} + self.client_id = client_id or ("auth-%s" % str(uuid1()).lower()) + self.with_family = with_family - self._password_filter = PyiCloudPasswordFilter(password) - logger.addFilter(self._password_filter) + self.password_filter = PyiCloudPasswordFilter(password) + LOGGER.addFilter(self.password_filter) if (domain == 'com'): - self._home_endpoint = 'https://www.icloud.com' - self._setup_endpoint = 'https://setup.icloud.com/setup/ws/1' + self.AUTH_ENDPOINT = "https://idmsa.apple.com/appleauth/auth" + self.HOME_ENDPOINT = "https://www.icloud.com" + self.SETUP_ENDPOINT = "https://setup.icloud.com/setup/ws/1" elif (domain == 'cn'): - self._home_endpoint = 'https://www.icloud.com.cn' - self._setup_endpoint = 'https://setup.icloud.com.cn/setup/ws/1' + self.AUTH_ENDPOINT = "https://idmsa.apple.com.cn/appleauth/auth" + self.HOME_ENDPOINT = "https://www.icloud.com.cn" + self.SETUP_ENDPOINT = "https://setup.icloud.com.cn/setup/ws/1" else: raise NotImplementedError(f"Domain '{domain}' is not supported yet") - self._base_login_url = '%s/login' % self._setup_endpoint if cookie_directory: - self._cookie_directory = os.path.expanduser( - os.path.normpath(cookie_directory) + self._cookie_directory = path.expanduser( + path.normpath(cookie_directory) ) + if not path.exists(self._cookie_directory): + mkdir(self._cookie_directory, 0o700) else: - self._cookie_directory = os.path.join( - tempfile.gettempdir(), - 'pyicloud', - ) + topdir = path.join(gettempdir(), "pyicloud") + self._cookie_directory = path.join(topdir, getpass.getuser()) + if not path.exists(topdir): + mkdir(topdir, 0o777) + if not path.exists(self._cookie_directory): + mkdir(self._cookie_directory, 0o700) + + LOGGER.debug("Using session file %s", self.session_path) + + self.session_data = {} + try: + with open(self.session_path, encoding="utf-8") as session_f: + self.session_data = json.load(session_f) + except: # pylint: disable=bare-except + LOGGER.info("Session file does not exist") + if self.session_data.get("client_id"): + self.client_id = self.session_data.get("client_id") + else: + self.session_data.update({"client_id": self.client_id}) self.session = PyiCloudSession(self) self.session.verify = verify self.session.headers.update({ - 'Origin': self._home_endpoint, - 'Referer': '%s/' % self._home_endpoint, + 'Origin': self.HOME_ENDPOINT, + 'Referer': '%s/' % self.HOME_ENDPOINT, 'User-Agent': 'Opera/9.52 (X11; Linux i686; U; en)' }) - cookiejar_path = self._get_cookiejar_path() + cookiejar_path = self.cookiejar_path self.session.cookies = cookielib.LWPCookieJar(filename=cookiejar_path) - if os.path.exists(cookiejar_path): + if path.exists(cookiejar_path): try: - self.session.cookies.load() - logger.debug("Read cookies from %s", cookiejar_path) + self.session.cookies.load(ignore_discard=True, ignore_expires=True) + LOGGER.debug("Read cookies from %s", cookiejar_path) except: # Most likely a pickled cookiejar from earlier versions. # The cookiejar will get replaced with a valid one after # successful authentication. - logger.warning("Failed to read cookiejar %s", cookiejar_path) + LOGGER.warning("Failed to read cookiejar %s", cookiejar_path) + # Unsure if this is still needed self.params = { 'clientBuildNumber': '17DHotfix5', 'clientMasteringNumber': '17DHotfix5', @@ -203,68 +304,187 @@ def __init__( self.authenticate() - def authenticate(self): + self._photos = None + + def authenticate(self, force_refresh=False, service=None): """ - Handles authentication, and persists the X-APPLE-WEB-KB cookie so that + Handles authentication, and persists cookies so that subsequent logins will not cause additional e-mails from Apple. """ - logger.info("Authenticating as %s", self.user['apple_id']) - - data = dict(self.user) + login_successful = False + if self.session_data.get("session_token") and not force_refresh: + LOGGER.debug("Checking session token validity") + try: + self.data = self._validate_token() + login_successful = True + except PyiCloudAPIResponseException: + LOGGER.debug("Invalid authentication token, will log in from scratch.") + + if not login_successful and service is not None: + app = self.data["apps"][service] + if "canLaunchWithOneFactor" in app and app["canLaunchWithOneFactor"]: + LOGGER.debug( + "Authenticating as %s for %s", self.user["accountName"], service + ) + try: + self._authenticate_with_credentials_service(service) + login_successful = True + except Exception: + LOGGER.debug( + "Could not log into service. Attempting brand new login." + ) + + if not login_successful: + LOGGER.debug("Authenticating as %s", self.user["accountName"]) + + data = dict(self.user) + + data["rememberMe"] = True + data["trustTokens"] = [] + if self.session_data.get("trust_token"): + data["trustTokens"] = [self.session_data.get("trust_token")] + + headers = self._get_auth_headers() + + if self.session_data.get("scnt"): + headers["scnt"] = self.session_data.get("scnt") + + if self.session_data.get("session_id"): + headers["X-Apple-ID-Session-Id"] = self.session_data.get("session_id") - # We authenticate every time, so "remember me" is not needed - data.update({'extended_login': False}) + try: + self.session.post( + "%s/signin" % self.AUTH_ENDPOINT, + params={"isRememberMeEnabled": "true"}, + data=json.dumps(data), + headers=headers, + ) + except PyiCloudAPIResponseException as error: + msg = "Invalid email/password combination." + raise PyiCloudFailedLoginException(msg, error) from error + + self._authenticate_with_token() + + # Is this needed? + self.params.update({'dsid': self.data['dsInfo']['dsid']}) + + self._webservices = self.data["webservices"] + + LOGGER.info("Authentication completed successfully") + LOGGER.debug(self.params) + + def _authenticate_with_token(self): + """Authenticate using session token.""" + data = { + "accountCountryCode": self.session_data.get("account_country"), + "dsWebAuthToken": self.session_data.get("session_token"), + "extended_login": True, + "trustToken": self.session_data.get("trust_token", ""), + } try: req = self.session.post( - self._base_login_url, - params=self.params, - data=json.dumps(data) + "%s/accountLogin" % self.SETUP_ENDPOINT, data=json.dumps(data) ) - resp = req.json() - except PyiCloudAPIResponseError as error: - msg = 'Invalid email/password combination.' - raise PyiCloudFailedLoginException(msg, error) + self.data = req.json() + except PyiCloudAPIResponseException as error: + msg = "Invalid authentication token." + raise PyiCloudFailedLoginException(msg, error) from error # {'domainToUse': 'iCloud.com'} - domain_to_use = resp.get('domainToUse') + domain_to_use = self.data.get('domainToUse') if domain_to_use != None: msg = f'Apple insists on using {domain_to_use} for your request. Please use --domain parameter' raise PyiCloudConnectionException(msg) - self.params.update({'dsid': resp['dsInfo']['dsid']}) + def _authenticate_with_credentials_service(self, service): + """Authenticate to a specific service using credentials.""" + data = { + "appName": service, + "apple_id": self.user["accountName"], + "password": self.user["password"], + } - if not os.path.exists(self._cookie_directory): - os.mkdir(self._cookie_directory) - self.session.cookies.save() - logger.debug("Cookies saved to %s", self._get_cookiejar_path()) + try: + self.session.post( + "%s/accountLogin" % self.SETUP_ENDPOINT, data=json.dumps(data) + ) - self.data = resp - self.webservices = self.data['webservices'] + self.data = self._validate_token() + except PyiCloudAPIResponseException as error: + msg = "Invalid email/password combination." + raise PyiCloudFailedLoginException(msg, error) from error - logger.info("Authentication completed successfully") - logger.debug(self.params) + def _validate_token(self): + """Checks if the current access token is still valid.""" + LOGGER.debug("Checking session token validity") + try: + req = self.session.post("%s/validate" % self.SETUP_ENDPOINT, data="null") + LOGGER.debug("Session token is still valid") + return req.json() + except PyiCloudAPIResponseException as err: + LOGGER.debug("Invalid authentication token") + raise err + + def _get_auth_headers(self, overrides=None): + headers = { + "Accept": "*/*", + "Content-Type": "application/json", + "X-Apple-OAuth-Client-Id": "d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d", + "X-Apple-OAuth-Client-Type": "firstPartyAuth", + "X-Apple-OAuth-Redirect-URI": "https://www.icloud.com", + "X-Apple-OAuth-Require-Grant-Code": "true", + "X-Apple-OAuth-Response-Mode": "web_message", + "X-Apple-OAuth-Response-Type": "code", + "X-Apple-OAuth-State": self.client_id, + "X-Apple-Widget-Key": "d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d", + } + if overrides: + headers.update(overrides) + return headers - def _get_cookiejar_path(self): - # Get path for cookiejar file - return os.path.join( + @property + def cookiejar_path(self): + """Get path for cookiejar file.""" + return path.join( self._cookie_directory, - ''.join([c for c in self.user.get('apple_id') if match(r'\w', c)]) + "".join([c for c in self.user.get("accountName") if match(r"\w", c)]), + ) + + @property + def session_path(self): + """Get path for session data file.""" + return path.join( + self._cookie_directory, + "".join([c for c in self.user.get("accountName") if match(r"\w", c)]) + + ".session", ) @property def requires_2sa(self): - """ Returns True if two-step authentication is required.""" - return self.data.get('hsaChallengeRequired', False) \ - and self.data['dsInfo'].get('hsaVersion', 0) >= 1 - # FIXME: Implement 2FA for hsaVersion == 2 + """Returns True if two-step authentication is required.""" + return self.data.get("dsInfo", {}).get("hsaVersion", 0) >= 1 and ( + self.data.get("hsaChallengeRequired", False) or not self.is_trusted_session + ) + + @property + def requires_2fa(self): + """Returns True if two-factor authentication is required.""" + return self.data["dsInfo"].get("hsaVersion", 0) == 2 and ( + self.data.get("hsaChallengeRequired", False) or not self.is_trusted_session + ) and self.data["dsInfo"].get("hasICloudQualifyingDevice", False) + + @property + def is_trusted_session(self): + """Returns True if the session is trusted.""" + return self.data.get("hsaTrustedBrowser", False) @property def trusted_devices(self): """ Returns devices trusted for two-step authentication.""" request = self.session.get( - '%s/listDevices' % self._setup_endpoint, + '%s/listDevices' % self.SETUP_ENDPOINT, params=self.params ) return request.json().get('devices') @@ -273,42 +493,99 @@ def send_verification_code(self, device): """ Requests that a verification code is sent to the given device""" data = json.dumps(device) request = self.session.post( - '%s/sendVerificationCode' % self._setup_endpoint, + '%s/sendVerificationCode' % self.SETUP_ENDPOINT, params=self.params, data=data ) return request.json().get('success', False) def validate_verification_code(self, device, code): - """ Verifies a verification code received on a trusted device""" - device.update({ - 'verificationCode': code, - 'trustBrowser': True - }) + """Verifies a verification code received on a trusted device.""" + device.update({"verificationCode": code, "trustBrowser": True}) data = json.dumps(device) try: - request = self.session.post( - '%s/validateVerificationCode' % self._setup_endpoint, + self.session.post( + "%s/validateVerificationCode" % self.SETUP_ENDPOINT, params=self.params, - data=data + data=data, ) - except PyiCloudAPIResponseError as error: - if error.code == -21669: + except PyiCloudAPIResponseException as error: + if str(error.code) == "-21669": # Wrong verification code return False raise - # Re-authenticate, which will both update the HSA data, and - # ensure that we save the X-APPLE-WEBAUTH-HSA-TRUST cookie. - self.authenticate() + # When validating a code through the 2SA endpoint + # the /2sv/trust URL returns 404 and won't return a trust token + # self.trust_session() + self._authenticate_with_token() return not self.requires_2sa + def validate_2fa_code(self, code): + """Verifies a verification code received via Apple's 2FA system (HSA2).""" + data = {"securityCode": {"code": code}} + + headers = self._get_auth_headers({"Accept": "application/json"}) + + if self.session_data.get("scnt"): + headers["scnt"] = self.session_data.get("scnt") + + if self.session_data.get("session_id"): + headers["X-Apple-ID-Session-Id"] = self.session_data.get("session_id") + + try: + self.session.post( + "%s/verify/trusteddevice/securitycode" % self.AUTH_ENDPOINT, + data=json.dumps(data), + headers=headers, + ) + except PyiCloudAPIResponseException as error: + if str(error.code) == "-21669": + # Wrong verification code + LOGGER.error("Code verification failed.") + return False + raise + + LOGGER.debug("Code verification successful.") + + self.trust_session() + return not self.requires_2sa + + def trust_session(self): + """Request session trust to avoid user log in going forward.""" + headers = self._get_auth_headers() + + if self.session_data.get("scnt"): + headers["scnt"] = self.session_data.get("scnt") + + if self.session_data.get("session_id"): + headers["X-Apple-ID-Session-Id"] = self.session_data.get("session_id") + + try: + self.session.get( + f"{self.AUTH_ENDPOINT}/2sv/trust", + headers=headers, + ) + self._authenticate_with_token() + return True + except PyiCloudAPIResponseException: + LOGGER.error("Session trust failed.") + return False + + def _get_webservice_url(self, ws_key): + """Get webservice URL, raise an exception if not exists.""" + if self._webservices.get(ws_key) is None: + raise PyiCloudServiceNotActivatedException( + "Webservice not available", ws_key + ) + return self._webservices[ws_key]["url"] + @property def devices(self): """ Return all devices.""" - service_root = self.webservices['findme']['url'] + service_root = self._get_webservice_url("findme") return FindMyiPhoneServiceManager( service_root, self.session, @@ -317,7 +594,7 @@ def devices(self): @property def account(self): - service_root = self.webservices['account']['url'] + service_root = self._gget_webservice_url("account") return AccountService( service_root, self.session, @@ -331,7 +608,7 @@ def iphone(self): @property def files(self): if not hasattr(self, '_files'): - service_root = self.webservices['ubiquity']['url'] + service_root = self._get_webservice_url("ubiquity") self._files = UbiquityService( service_root, self.session, @@ -341,32 +618,29 @@ def files(self): @property def photos(self): - if not hasattr(self, '_photos'): - service_root = self.webservices['ckdatabasews']['url'] - self._photos = PhotosService( - service_root, - self.session, - self.params - ) + """Gets the 'Photo' service.""" + if not self._photos: + service_root = self._get_webservice_url("ckdatabasews") + self._photos = PhotosService(service_root, self.session, self.params) return self._photos @property def calendar(self): - service_root = self.webservices['calendar']['url'] + service_root = self._get_webservice_url("calendar") return CalendarService(service_root, self.session, self.params) @property def contacts(self): - service_root = self.webservices['contacts']['url'] + service_root = self._get_webservice_url("contacts") return ContactsService(service_root, self.session, self.params) @property def reminders(self): - service_root = self.webservices['reminders']['url'] + service_root = self._get_webservice_url("reminders") return RemindersService(service_root, self.session, self.params) def __unicode__(self): - return 'iCloud API: %s' % self.user.get('apple_id') + return 'iCloud API: %s' % self.user.get('accountName') def __str__(self): as_unicode = self.__unicode__() diff --git a/src/pyicloud_ipd/cmdline.py b/src/pyicloud_ipd/cmdline.py index 3116fa924..83a39df47 100644 --- a/src/pyicloud_ipd/cmdline.py +++ b/src/pyicloud_ipd/cmdline.py @@ -1,54 +1,46 @@ #! /usr/bin/env python -# -*- coding: utf-8 -*- """ A Command Line Wrapper to allow easy use of pyicloud for command line scripts, and related. """ -from __future__ import print_function import argparse import pickle import sys from click import confirm -import pyicloud_ipd +from pyicloud_ipd import PyiCloudService +from pyicloud_ipd.exceptions import PyiCloudFailedLoginException from . import utils - -DEVICE_ERROR = ( - "Please use the --device switch to indicate which device to use." -) +DEVICE_ERROR = "Please use the --device switch to indicate which device to use." def create_pickled_data(idevice, filename): - """This helper will output the idevice to a pickled file named + """ + This helper will output the idevice to a pickled file named after the passed filename. This allows the data to be used without resorting to screen / pipe - scrapping. """ - data = {} - for x in idevice.content: - data[x] = idevice.content[x] - location = filename - pickle_file = open(location, 'wb') - pickle.dump(data, pickle_file, protocol=pickle.HIGHEST_PROTOCOL) - pickle_file.close() + scrapping. + """ + with open(filename, "wb") as pickle_file: + pickle.dump(idevice.content, pickle_file, protocol=pickle.HIGHEST_PROTOCOL) def main(args=None): - """Main commandline entrypoint""" + """Main commandline entrypoint.""" if args is None: args = sys.argv[1:] - parser = argparse.ArgumentParser( - description="Find My iPhone CommandLine Tool") + parser = argparse.ArgumentParser(description="Find My iPhone CommandLine Tool") parser.add_argument( "--username", action="store", dest="username", default="", - help="Apple ID to Use" + help="Apple ID to Use", ) parser.add_argument( "--password", @@ -58,7 +50,7 @@ def main(args=None): help=( "Apple ID Password to Use; if unspecified, password will be " "fetched from the system keyring." - ) + ), ) parser.add_argument( "-n", @@ -66,7 +58,7 @@ def main(args=None): action="store_false", dest="interactive", default=True, - help="Disable interactive prompts." + help="Disable interactive prompts.", ) parser.add_argument( "--delete-from-keyring", @@ -97,7 +89,7 @@ def main(args=None): help="Retrieve Location for the iDevice (non-exclusive).", ) - # Restrict actions to a specific devices UID / DID + # Restrict actions to a specific devices UID / DID parser.add_argument( "--device", action="store", @@ -106,7 +98,7 @@ def main(args=None): help="Only effect this device", ) - # Trigger Sound Alert + # Trigger Sound Alert parser.add_argument( "--sound", action="store_true", @@ -115,7 +107,7 @@ def main(args=None): help="Play a sound on the device", ) - # Trigger Message w/Sound Alert + # Trigger Message w/Sound Alert parser.add_argument( "--message", action="store", @@ -124,7 +116,7 @@ def main(args=None): help="Optional Text Message to display with a sound", ) - # Trigger Message (without Sound) Alert + # Trigger Message (without Sound) Alert parser.add_argument( "--silentmessage", action="store", @@ -133,7 +125,7 @@ def main(args=None): help="Optional Text Message to display with no sounds", ) - # Lost Mode + # Lost Mode parser.add_argument( "--lostmode", action="store_true", @@ -163,7 +155,7 @@ def main(args=None): help="Forcibly display this message when activating lost mode.", ) - # Output device data to an pickle file + # Output device data to an pickle file parser.add_argument( "--outputfile", action="store_true", @@ -177,7 +169,7 @@ def main(args=None): action="store", dest="domain", default="com", - help="Root Domain for requests to iCloud. com or cn", + help="Root domain for requests to iCloud. com or cn", ) command_line = parser.parse_args(args) @@ -194,56 +186,80 @@ def main(args=None): # Which password we use is determined by your username, so we # do need to check for this first and separately. if not username: - parser.error('No username supplied') + parser.error("No username supplied") if not password: password = utils.get_password( - username, - interactive=command_line.interactive + username, interactive=command_line.interactive ) if not password: - parser.error('No password supplied') + parser.error("No password supplied") try: - api = pyicloud_ipd.PyiCloudService( + api = PyiCloudService( domain, username.strip(), - password.strip() + password.strip(), ) if ( - not utils.password_exists_in_keyring(username) and - command_line.interactive and - confirm("Save password in keyring? ") + not utils.password_exists_in_keyring(username) + and command_line.interactive + and confirm("Save password in keyring?") ): utils.store_password_in_keyring(username, password) - if api.requires_2sa: - import click - print("Two-step authentication required.", - "Your trusted devices are:") + if api.requires_2fa: + # fmt: off + print( + "\nTwo-step authentication required.", + "\nPlease enter validation code" + ) + # fmt: on + + code = input("(string) --> ") + if not api.validate_2fa_code(code): + print("Failed to verify verification code") + sys.exit(1) + + print("") + + elif api.requires_2sa: + # fmt: off + print( + "\nTwo-step authentication required.", + "\nYour trusted devices are:" + ) + # fmt: on devices = api.trusted_devices for i, device in enumerate(devices): - print(" %s: %s" % ( - i, device.get( - 'deviceName', - "SMS to %s" % device.get('phoneNumber')))) + print( + " %s: %s" + % ( + i, + device.get( + "deviceName", "SMS to %s" % device.get("phoneNumber") + ), + ) + ) - device = click.prompt('Which device would you like to use?', - default=0) + print("\nWhich device would you like to use?") + device = int(input("(number) --> ")) device = devices[device] if not api.send_verification_code(device): print("Failed to send verification code") sys.exit(1) - code = click.prompt('Please enter validation code') + print("\nPlease enter validation code") + code = input("(string) --> ") if not api.validate_verification_code(device, code): print("Failed to verify verification code") sys.exit(1) + print("") break - except pyicloud_ipd.exceptions.PyiCloudFailedLoginException: + except PyiCloudFailedLoginException as err: # If they have a stored password; we just used it and # it did not work; let's delete it if there is one. if utils.password_exists_in_keyring(username): @@ -256,38 +272,32 @@ def main(args=None): failure_count += 1 if failure_count >= 3: - raise RuntimeError(message) + raise RuntimeError(message) from err print(message, file=sys.stderr) for dev in api.devices: - if ( - not command_line.device_id or - ( - command_line.device_id.strip().lower() == - dev.content["id"].strip().lower() - ) + if not command_line.device_id or ( + command_line.device_id.strip().lower() == dev.content["id"].strip().lower() ): - # List device(s) + # List device(s) if command_line.locate: dev.location() if command_line.output_to_file: create_pickled_data( dev, - filename=( - dev.content["name"].strip().lower() + ".fmip_snapshot" - ) + filename=(dev.content["name"].strip().lower() + ".fmip_snapshot"), ) contents = dev.content if command_line.longlist: - print("-"*30) + print("-" * 30) print(contents["name"]) - for x in contents: - print("%20s - %s" % (x, contents[x])) + for key in contents: + print("%20s - %s" % (key, contents[key])) elif command_line.list: - print("-"*30) + print("-" * 30) print("Name - %s" % contents["name"]) print("Display Name - %s" % contents["deviceDisplayName"]) print("Location - %s" % contents["location"]) @@ -296,68 +306,70 @@ def main(args=None): print("Device Class - %s" % contents["deviceClass"]) print("Device Model - %s" % contents["deviceModel"]) - # Play a Sound on a device + # Play a Sound on a device if command_line.sound: if command_line.device_id: dev.play_sound() else: raise RuntimeError( - "\n\n\t\t%s %s\n\n" % ( + "\n\n\t\t%s %s\n\n" + % ( "Sounds can only be played on a singular device.", - DEVICE_ERROR + DEVICE_ERROR, ) ) - # Display a Message on the device + # Display a Message on the device if command_line.message: if command_line.device_id: dev.display_message( - subject='A Message', - message=command_line.message, - sounds=True + subject="A Message", message=command_line.message, sounds=True ) else: raise RuntimeError( - "%s %s" % ( - "Messages can only be played " - "on a singular device.", - DEVICE_ERROR + "%s %s" + % ( + "Messages can only be played on a singular device.", + DEVICE_ERROR, ) ) - # Display a Silent Message on the device + # Display a Silent Message on the device if command_line.silentmessage: if command_line.device_id: dev.display_message( - subject='A Silent Message', + subject="A Silent Message", message=command_line.silentmessage, - sounds=False + sounds=False, ) else: raise RuntimeError( - "%s %s" % ( + "%s %s" + % ( "Silent Messages can only be played " "on a singular device.", - DEVICE_ERROR + DEVICE_ERROR, ) ) - # Enable Lost mode + # Enable Lost mode if command_line.lostmode: if command_line.device_id: dev.lost_device( number=command_line.lost_phone.strip(), text=command_line.lost_message.strip(), - newpasscode=command_line.lost_password.strip() + newpasscode=command_line.lost_password.strip(), ) else: raise RuntimeError( - "%s %s" % ( - "Lost Mode can only be activated " - "on a singular device.", - DEVICE_ERROR + "%s %s" + % ( + "Lost Mode can only be activated on a singular device.", + DEVICE_ERROR, ) ) + sys.exit(0) + -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/src/pyicloud_ipd/exceptions.py b/src/pyicloud_ipd/exceptions.py index ef9c91729..c14be60a0 100644 --- a/src/pyicloud_ipd/exceptions.py +++ b/src/pyicloud_ipd/exceptions.py @@ -1,12 +1,54 @@ class PyiCloudException(Exception): + """Generic iCloud exception.""" pass -class PyiCloudConnectionException(PyiCloudException): +#API +class PyiCloudAPIResponseException(PyiCloudException): + """iCloud response exception.""" + def __init__(self, reason, code=None, retry=False): + self.reason = reason + self.code = code + message = reason or "" + if code: + message += " (%s)" % code + if retry: + message += ". Retrying ..." + + super().__init__(message) + + +class PyiCloudServiceNotActivatedException(PyiCloudAPIResponseException): + """iCloud service not activated exception.""" + pass + + +# Login +class PyiCloudFailedLoginException(PyiCloudException): + """iCloud failed login exception.""" pass + +class PyiCloud2SARequiredException(PyiCloudException): + """iCloud 2SA required exception.""" + def __init__(self, apple_id): + message = "Two-step authentication required for account: %s" % apple_id + super().__init__(message) + + +class PyiCloudNoStoredPasswordAvailableException(PyiCloudException): + """iCloud no stored password exception.""" + pass + + +# Webservice specific class PyiCloudNoDevicesException(PyiCloudException): + """iCloud no device exception.""" + pass + +# Potentially Deprecated - Further review needed +class PyiCloudConnectionException(PyiCloudException): pass @@ -21,10 +63,6 @@ def __init__(self, reason, code): super(PyiCloudAPIResponseError, self).__init__(message) -class PyiCloudFailedLoginException(PyiCloudException): - pass - - class PyiCloud2SARequiredError(PyiCloudException): def __init__(self, url): message = "Two-step authentication required for %s" % url diff --git a/src/pyicloud_ipd/services/photos.py b/src/pyicloud_ipd/services/photos.py index 2c53c4b1d..6529095cb 100644 --- a/src/pyicloud_ipd/services/photos.py +++ b/src/pyicloud_ipd/services/photos.py @@ -5,8 +5,8 @@ import re from datetime import datetime -from pyicloud_ipd.exceptions import PyiCloudServiceNotActivatedErrror -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudServiceNotActivatedException +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException import pytz @@ -159,7 +159,7 @@ def __init__(self, service, zone_id): response = request.json() indexing_state = response['records'][0]['fields']['state']['value'] if indexing_state != 'FINISHED': - raise PyiCloudServiceNotActivatedErrror( + raise PyiCloudServiceNotActivatedException( ('iCloud Photo Library not finished indexing. Please try ' 'again in a few minutes'), None) @@ -355,7 +355,7 @@ def photos(self): while(True): try: request = self.photos_request(offset) - except PyiCloudAPIResponseError as ex: + except PyiCloudAPIResponseException as ex: if self.exception_handler: exception_retries += 1 self.exception_handler(ex, exception_retries) diff --git a/src/pyicloud_ipd/utils.py b/src/pyicloud_ipd/utils.py index 378b52ca9..f7fc53133 100644 --- a/src/pyicloud_ipd/utils.py +++ b/src/pyicloud_ipd/utils.py @@ -2,8 +2,7 @@ import keyring import sys -from .exceptions import NoStoredPasswordAvailable - +from .exceptions import PyiCloudNoStoredPasswordAvailableException KEYRING_SYSTEM = 'pyicloud://icloud-password' @@ -11,7 +10,7 @@ def get_password(username, interactive=sys.stdout.isatty()): try: return get_password_from_keyring(username) - except NoStoredPasswordAvailable: + except PyiCloudNoStoredPasswordAvailableException: if not interactive: raise @@ -25,7 +24,7 @@ def get_password(username, interactive=sys.stdout.isatty()): def password_exists_in_keyring(username): try: get_password_from_keyring(username) - except NoStoredPasswordAvailable: + except PyiCloudNoStoredPasswordAvailableException: return False return True @@ -37,7 +36,7 @@ def get_password_from_keyring(username): username ) if result is None: - raise NoStoredPasswordAvailable( + raise PyiCloudNoStoredPasswordAvailableException( "No pyicloud password for {username} could be found " "in the system keychain. Use the `--store-in-keyring` " "command-line option for storing a password for this " diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 164bcfd63..023528be5 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -24,6 +24,12 @@ def inject_fixtures(self, caplog): self.vcr_path = os.path.join(self.root_path, "vcr_cassettes") def test_failed_auth(self): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + with vcr.use_cassette(os.path.join(self.vcr_path, "failed_auth.yml")): with self.assertRaises( pyicloud_ipd.exceptions.PyiCloudFailedLoginException @@ -31,6 +37,7 @@ def test_failed_auth(self): authenticator(setup_logger(), "com")( "bad_username", "bad_password", + cookie_directory=cookie_dir, client_id="EC5646DE-9423-11E8-BF21-14109FE0B321", ) @@ -38,7 +45,13 @@ def test_failed_auth(self): "Invalid email/password combination." in str(context.exception)) def test_2sa_required(self): - with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2sa.yml")): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_code.yml")): with self.assertRaises(TwoStepAuthRequiredError) as context: # To re-record this HTTP request, # delete ./tests/vcr_cassettes/auth_requires_2sa.yml, @@ -48,6 +61,33 @@ def test_2sa_required(self): "jdoe@gmail.com", "password1", raise_error_on_2sa=True, + cookie_directory=cookie_dir, + client_id="DE309E26-942E-11E8-92F5-14109FE0B321", + ) + + self.assertTrue( + "Two-step/two-factor authentication is required" + in str(context.exception) + ) + + def test_2fa_required(self): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2fa.yml")): + with self.assertRaises(TwoStepAuthRequiredError) as context: + # To re-record this HTTP request, + # delete ./tests/vcr_cassettes/auth_requires_2fa.yml, + # put your actual credentials in here, run the test, + # and then replace with dummy credentials. + authenticator(setup_logger(), "com")( + "jdoe@gmail.com", + "password1", + raise_error_on_2sa=True, + cookie_directory=cookie_dir, client_id="EC5646DE-9423-11E8-BF21-14109FE0B321", ) @@ -56,19 +96,62 @@ def test_2sa_required(self): in str(context.exception) ) - def test_successful_auth(self): + def test_successful_token_validation(self): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + # We need to create a session file first before we test the auth token validation + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_code.yml")): + runner = CliRunner(env={ + "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" + }) + result = runner.invoke( + main, + [ + "--username", + "jdoe@gmail.com", + "--password", + "password1", + "--no-progress-bar", + "--cookie-directory", + cookie_dir, + "--auth-only", + ], + input="0\n654321\n", + ) + assert result.exit_code ==0 + with vcr.use_cassette(os.path.join(self.vcr_path, "successful_auth.yml")): - authenticator(setup_logger(), "com")( - "jdoe@gmail.com", - "password1", - client_id="EC5646DE-9423-11E8-BF21-14109FE0B321", + runner = CliRunner(env={ + "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" + }) + result = runner.invoke( + main, + [ + "--username", + "jdoe@gmail.com", + "--password", + "password1", + "--no-progress-bar", + "--cookie-directory", + cookie_dir, + "--auth-only", + ], ) + self.assertIn("INFO Authentication completed successfully", self._caplog.text) + assert result.exit_code == 0 def test_password_prompt(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") - with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_code.yml")): runner = CliRunner(env={ "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" }) @@ -77,25 +160,26 @@ def test_password_prompt(self): [ "--username", "jdoe@gmail.com", - "--recent", - "0", "--no-progress-bar", - "-d", - base_dir, + "--cookie-directory", + cookie_dir, + "--auth-only", ], - input="password1\n", + input="password1\n0\n654321\n", ) self.assertIn("DEBUG Authenticating...", self._caplog.text) self.assertIn( - "DEBUG Looking up all photos and videos from album All Photos...", - self._caplog.text + "INFO Two-step/two-factor authentication is required", + self._caplog.text, ) + self.assertIn(" 0: SMS to *******03", result.output) + self.assertIn("Please choose an option: [0]: 0", result.output) self.assertIn( - "INFO All photos have been downloaded", self._caplog.text + "Please enter two-factor authentication code: 654321", result.output + ) + self.assertIn( + "INFO Great, you're all set up. The script can now be run without " + "user interaction until 2SA expires.", + self._caplog.text, ) assert result.exit_code == 0 - - files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) - - assert sum(1 for _ in files_in_result) == 0 diff --git a/tests/test_autodelete_photos.py b/tests/test_autodelete_photos.py index 93dee6bde..2ba1b5094 100644 --- a/tests/test_autodelete_photos.py +++ b/tests/test_autodelete_photos.py @@ -11,7 +11,7 @@ from click.testing import CliRunner from pyicloud_ipd.services.photos import PhotoAsset from pyicloud_ipd.base import PyiCloudService -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException from icloudpd.base import main from tests.helpers import path_from_project_root, recreate_path, print_result_exception import inspect @@ -31,7 +31,11 @@ def inject_fixtures(self, caplog): def test_autodelete_invalid_creation_date(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ "2018/01/01/IMG_3589.JPG" @@ -61,14 +65,16 @@ def astimezone(self, tz=None): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( -# f"INFO Downloading the first original photo or video to {base_dir} ...", +# f"INFO Downloading the first original photo or video to {data_dir} ...", f"INFO Downloading the first original photo or video", self._caplog.text, ) @@ -77,7 +83,7 @@ def astimezone(self, tz=None): self._caplog.text, ) self.assertIn( - f"INFO Downloaded {os.path.join(base_dir, os.path.normpath('2018/01/01/IMG_3589.JPG'))}", + f"INFO Downloaded {os.path.join(data_dir, os.path.normpath('2018/01/01/IMG_3589.JPG'))}", self._caplog.text, ) self.assertIn( @@ -91,7 +97,7 @@ def astimezone(self, tz=None): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" result = runner.invoke( main, @@ -104,7 +110,9 @@ def astimezone(self, tz=None): "0", "--auto-delete", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -112,7 +120,7 @@ def astimezone(self, tz=None): self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 0 original photos and videos to {base_dir} ...", + f"INFO Downloading 0 original photos and videos to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -124,17 +132,21 @@ def astimezone(self, tz=None): ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath('2018/01/01/IMG_3589.JPG'))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath('2018/01/01/IMG_3589.JPG'))}", self._caplog.text, ) for file_name in files: assert not os.path.exists( - os.path.join(base_dir, file_name)), f"{file_name} not expected, but present" + os.path.join(data_dir, file_name)), f"{file_name} not expected, but present" def test_download_autodelete_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1686106167436.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/IMG_3589.JPG" @@ -156,19 +168,21 @@ def test_download_autodelete_photos(self): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( -# f"INFO Downloading the first original photo or video to {base_dir} ...", +# f"INFO Downloading the first original photo or video to {data_dir} ...", f"INFO Downloading the first original photo or video", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) self.assertIn( @@ -182,7 +196,7 @@ def test_download_autodelete_photos(self): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" result = runner.invoke( main, @@ -195,14 +209,16 @@ def test_download_autodelete_photos(self): "0", "--auto-delete", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 0 original photos and videos to {base_dir} ...", + f"INFO Downloading 0 original photos and videos to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -214,17 +230,21 @@ def test_download_autodelete_photos(self): ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) for file_name in files: assert not os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} not expected, but present" + data_dir, file_name)), f"{file_name} not expected, but present" def test_autodelete_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ "2018/07/30/IMG_7407.JPG", @@ -239,15 +259,15 @@ def test_autodelete_photos(self): ] os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532940539000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532940539000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532618424000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532618424000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1531371164630.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1531371164630.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) # create some empty files for file_name in files_to_create + files_to_delete: - open(os.path.join(base_dir, file_name), "a").close() + open(os.path.join(data_dir, file_name), "a").close() with vcr.use_cassette(os.path.join(self.vcr_path, "autodelete_photos.yml")): # Pass fixed client ID via environment variable @@ -266,13 +286,15 @@ def test_autodelete_photos(self): "--skip-videos", "--auto-delete", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 0 original photos to {base_dir} ...", + f"INFO Downloading 0 original photos to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -284,19 +306,19 @@ def test_autodelete_photos(self): ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath(files_to_delete[0]))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath(files_to_delete[0]))}", self._caplog.text, ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath(files_to_delete[1]))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath(files_to_delete[1]))}", self._caplog.text, ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath(files_to_delete[2]))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath(files_to_delete[2]))}", self._caplog.text, ) self.assertIn( - f"INFO Deleted {os.path.join(base_dir, os.path.normpath(files_to_delete[3]))}", + f"INFO Deleted {os.path.join(data_dir, os.path.normpath(files_to_delete[3]))}", self._caplog.text, ) @@ -306,22 +328,26 @@ def test_autodelete_photos(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_create) # check files for file_name in files_to_create: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" for file_name in files_to_delete: assert not os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} not expected, but present" + data_dir, file_name)), f"{file_name} not expected, but present" def test_retry_delete_after_download_session_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1686106167436.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/IMG_3589.JPG" @@ -332,7 +358,7 @@ def test_retry_delete_after_download_session_error(self): def mock_raise_response_error(a0_, a1_, a2_): if not hasattr(self, f"already_raised_session_exception{inspect.stack()[0][3]}"): setattr(self, f"already_raised_session_exception{inspect.stack()[0][3]}", True) - raise PyiCloudAPIResponseError( + raise PyiCloudAPIResponseException( "Invalid global session", 100) with mock.patch("time.sleep") as sleep_mock: @@ -366,7 +392,9 @@ def mocked_authenticate(self): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -374,11 +402,11 @@ def mocked_authenticate(self): self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) @@ -399,16 +427,20 @@ def mocked_authenticate(self): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 1 def test_retry_fail_delete_after_download_session_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1686106167436.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/IMG_3589.JPG" @@ -417,7 +449,7 @@ def test_retry_fail_delete_after_download_session_error(self): with vcr.use_cassette(os.path.join(self.vcr_path, "download_autodelete_photos.yml")): def mock_raise_response_error(a0_, a1_, a2_): - raise PyiCloudAPIResponseError("Invalid global session", 100) + raise PyiCloudAPIResponseException("Invalid global session", 100) with mock.patch("time.sleep") as sleep_mock: with mock.patch("icloudpd.base.delete_photo") as pa_delete: @@ -450,7 +482,9 @@ def mocked_authenticate(self): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -458,11 +492,11 @@ def mocked_authenticate(self): self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) @@ -483,16 +517,20 @@ def mocked_authenticate(self): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 1 def test_retry_delete_after_download_internal_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1686106167436.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/IMG_3589.JPG" @@ -503,7 +541,7 @@ def test_retry_delete_after_download_internal_error(self): def mock_raise_response_error(a0_, a1_, a2_): if not hasattr(self, f"already_raised_session_exception{inspect.stack()[0][3]}"): setattr(self, f"already_raised_session_exception{inspect.stack()[0][3]}", True) - raise PyiCloudAPIResponseError( + raise PyiCloudAPIResponseException( "INTERNAL_ERROR", "INTERNAL_ERROR") with mock.patch("time.sleep") as sleep_mock: @@ -525,7 +563,9 @@ def mock_raise_response_error(a0_, a1_, a2_): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -533,11 +573,11 @@ def mock_raise_response_error(a0_, a1_, a2_): self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) @@ -558,16 +598,20 @@ def mock_raise_response_error(a0_, a1_, a2_): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 1 def test_retry_fail_delete_after_download_internal_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files = [ f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1686106167436.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/IMG_3589.JPG" @@ -576,7 +620,7 @@ def test_retry_fail_delete_after_download_internal_error(self): with vcr.use_cassette(os.path.join(self.vcr_path, "download_autodelete_photos.yml")): def mock_raise_response_error(a0_, a1_, a2_): - raise PyiCloudAPIResponseError("INTERNAL_ERROR", "INTERNAL_ERROR") + raise PyiCloudAPIResponseException("INTERNAL_ERROR", "INTERNAL_ERROR") with mock.patch("time.sleep") as sleep_mock: with mock.patch("icloudpd.base.delete_photo") as pa_delete: @@ -597,7 +641,9 @@ def mock_raise_response_error(a0_, a1_, a2_): "1", "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -605,11 +651,11 @@ def mock_raise_response_error(a0_, a1_, a2_): self.assertIn( "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(files[0]))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(files[0]))}", self._caplog.text, ) @@ -630,16 +676,20 @@ def mock_raise_response_error(a0_, a1_, a2_): # check files for file_name in files: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 1 def test_autodelete_photos_dry_run(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ "2018/07/30/IMG_7407.JPG", @@ -654,15 +704,15 @@ def test_autodelete_photos_dry_run(self): ] os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532940539000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532940539000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532618424000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1532618424000.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) os.makedirs(os.path.join( - base_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1531371164630.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) + data_dir, f"{'{:%Y/%m/%d}'.format(datetime.datetime.fromtimestamp(1531371164630.0 / 1000.0, tz=pytz.utc).astimezone(get_localzone()))}/")) # create some empty files for file_name in files_to_create + files_to_delete: - open(os.path.join(base_dir, file_name), "a").close() + open(os.path.join(data_dir, file_name), "a").close() with vcr.use_cassette(os.path.join(self.vcr_path, "autodelete_photos.yml")): # Pass fixed client ID via environment variable @@ -682,7 +732,9 @@ def test_autodelete_photos_dry_run(self): "--skip-videos", "--auto-delete", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -690,7 +742,7 @@ def test_autodelete_photos_dry_run(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 0 original photos to {base_dir} ...", + f"INFO Downloading 0 original photos to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -702,19 +754,19 @@ def test_autodelete_photos_dry_run(self): ) self.assertIn( - f"INFO [DRY RUN] Would delete {os.path.join(base_dir, os.path.normpath(files_to_delete[0]))}", + f"INFO [DRY RUN] Would delete {os.path.join(data_dir, os.path.normpath(files_to_delete[0]))}", self._caplog.text, ) self.assertIn( - f"INFO [DRY RUN] Would delete {os.path.join(base_dir, os.path.normpath(files_to_delete[1]))}", + f"INFO [DRY RUN] Would delete {os.path.join(data_dir, os.path.normpath(files_to_delete[1]))}", self._caplog.text, ) self.assertIn( - f"INFO [DRY RUN] Would delete {os.path.join(base_dir, os.path.normpath(files_to_delete[2]))}", + f"INFO [DRY RUN] Would delete {os.path.join(data_dir, os.path.normpath(files_to_delete[2]))}", self._caplog.text, ) self.assertIn( - f"INFO [DRY RUN] Would delete {os.path.join(base_dir, os.path.normpath(files_to_delete[3]))}", + f"INFO [DRY RUN] Would delete {os.path.join(data_dir, os.path.normpath(files_to_delete[3]))}", self._caplog.text, ) @@ -724,15 +776,15 @@ def test_autodelete_photos_dry_run(self): self.assertEqual(result.exit_code, 0, "Exit code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) self.assertEqual(sum(1 for _ in files_in_result), len(files_to_create) + len(files_to_delete), "Files in the result") # check files for file_name in files_to_create: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected, but missing" + data_dir, file_name)), f"{file_name} expected, but missing" for file_name in files_to_delete: assert os.path.exists(os.path.join( - base_dir, file_name)), f"{file_name} expected to stay, but missing" + data_dir, file_name)), f"{file_name} expected to stay, but missing" diff --git a/tests/test_cli.py b/tests/test_cli.py index 6920a8751..8f4865ec8 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -29,7 +29,11 @@ def test_cli(self): def test_log_levels(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) parameters = [ ("debug", ["DEBUG", "INFO"], []), @@ -38,6 +42,7 @@ def test_log_levels(self): ] for log_level, expected, not_expected in parameters: self._caplog.clear() + recreate_path(cookie_dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): # Pass fixed client ID via environment variable runner = CliRunner(env={ @@ -55,7 +60,9 @@ def test_log_levels(self): "--log-level", log_level, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) assert result.exit_code == 0 @@ -64,13 +71,17 @@ def test_log_levels(self): for text in not_expected: self.assertNotIn(text, self._caplog.text) - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_tqdm(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): # Force tqdm progress bar via ENV var @@ -88,20 +99,26 @@ def test_tqdm(self): "--recent", "0", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) - + assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_unicode_directory(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): # Pass fixed client ID via environment variable @@ -120,12 +137,14 @@ def test_unicode_directory(self): "--log-level", "info", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 diff --git a/tests/test_download_live_photos.py b/tests/test_download_live_photos.py index 8bea75030..4b1b4c8c1 100644 --- a/tests/test_download_live_photos.py +++ b/tests/test_download_live_photos.py @@ -12,7 +12,7 @@ from piexif._exceptions import InvalidImageDataError from pyicloud_ipd.services.photos import PhotoAsset, PhotoAlbum, PhotosService from pyicloud_ipd.base import PyiCloudService -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException from requests.exceptions import ConnectionError from icloudpd.base import main from tests.helpers import path_from_project_root, print_result_exception, recreate_path @@ -31,7 +31,11 @@ def inject_fixtures(self, caplog): def test_skip_existing_downloads_for_live_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ "2020/11/04/IMG_0516.HEIC", @@ -59,21 +63,23 @@ def test_skip_existing_downloads_for_live_photos(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir ], ) print_result_exception(result) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))}", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))}", self._caplog.text, ) self.assertIn( @@ -81,16 +87,20 @@ def test_skip_existing_downloads_for_live_photos(self): ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" + assert os.path.exists(os.path.join(data_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" def test_skip_existing_live_photodownloads(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2020/11/04/IMG_0516.HEIC", 1651485), @@ -104,11 +114,11 @@ def test_skip_existing_live_photodownloads(self): ] # simulate that some expected files are there with correct sizes - os.makedirs(os.path.join(base_dir, "2020/11/04")) + os.makedirs(os.path.join(data_dir, "2020/11/04")) # one photo and one movie are already there and should be skipped # Create dummies with the correct size for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "download_live_photos.yml")): @@ -129,7 +139,9 @@ def test_skip_existing_live_photodownloads(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -138,23 +150,23 @@ def test_skip_existing_live_photodownloads(self): "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text ) self.assertIn( - f"INFO Downloading 3 original photos and videos to {base_dir} ...", + f"INFO Downloading 3 original photos and videos to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists", self._caplog.text, ) self.assertIn( @@ -163,16 +175,20 @@ def test_skip_existing_live_photodownloads(self): assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) + len(files_to_create) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" + assert os.path.exists(os.path.join(data_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" def test_skip_existing_live_photo_print_filenames(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2020/11/04/IMG_0516.HEIC", 1651485), @@ -186,11 +202,11 @@ def test_skip_existing_live_photo_print_filenames(self): ] # simulate that some expected files are there with correct sizes - os.makedirs(os.path.join(base_dir, "2020/11/04")) + os.makedirs(os.path.join(data_dir, "2020/11/04")) # one photo and one movie are already there and should be skipped # Create dummies with the correct size for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "download_live_photos.yml")): @@ -212,7 +228,9 @@ def test_skip_existing_live_photo_print_filenames(self): 1, "--only-print-filenames", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -224,15 +242,15 @@ def test_skip_existing_live_photo_print_filenames(self): assert len(filenames) == 3 self.assertEqual( - os.path.join(base_dir, os.path.normpath("2020/11/04/IMG_0514.HEIC")), + os.path.join(data_dir, os.path.normpath("2020/11/04/IMG_0514.HEIC")), filenames[0] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2020/11/04/IMG_0512.HEIC")), + os.path.join(data_dir, os.path.normpath("2020/11/04/IMG_0512.HEIC")), filenames[1] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2020/11/04/IMG_0512_HEVC.MOV")), + os.path.join(data_dir, os.path.normpath("2020/11/04/IMG_0512_HEVC.MOV")), filenames[2] ) @@ -241,9 +259,9 @@ def test_skip_existing_live_photo_print_filenames(self): assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_create) for file_name in ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" + assert os.path.exists(os.path.join(data_dir, os.path.normpath(file_name))), f"file {file_name} expected, but not found" diff --git a/tests/test_download_photos.py b/tests/test_download_photos.py index 16d7fa79f..5495b0bac 100644 --- a/tests/test_download_photos.py +++ b/tests/test_download_photos.py @@ -13,7 +13,7 @@ from icloudpd import constants from pyicloud_ipd.services.photos import PhotoAsset, PhotoAlbum, PhotoLibrary from pyicloud_ipd.base import PyiCloudService -from pyicloud_ipd.exceptions import PyiCloudAPIResponseError +from pyicloud_ipd.exceptions import PyiCloudAPIResponseException from requests.exceptions import ConnectionError from icloudpd.base import main from tests.helpers import path_from_project_root, print_result_exception, recreate_path @@ -33,7 +33,11 @@ def inject_fixtures(self, caplog): def test_download_and_skip_existing_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/30/IMG_7408.JPG", 1151066), @@ -44,9 +48,9 @@ def test_download_and_skip_existing_photos(self): '2018/07/31/IMG_7409.JPG' ] - os.makedirs(os.path.join(base_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/30/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): @@ -70,7 +74,9 @@ def test_download_and_skip_existing_photos(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -78,11 +84,11 @@ def test_download_and_skip_existing_photos(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 5 original photos to {base_dir} ...", + f"INFO Downloading 5 original photos to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertNotIn( @@ -90,11 +96,11 @@ def test_download_and_skip_existing_photos(self): self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", self._caplog.text, ) self.assertIn( @@ -112,19 +118,19 @@ def test_download_and_skip_existing_photos(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_create) + len(files_to_download) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" # Check that file was downloaded # Check that mtime was updated to the photo creation date photo_mtime = os.path.getmtime(os.path.join( - base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG"))) + data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG"))) photo_modified_time = datetime.datetime.utcfromtimestamp(photo_mtime) self.assertEqual( "2018-07-31 07:22:24", @@ -132,7 +138,11 @@ def test_download_and_skip_existing_photos(self): def test_download_photos_and_set_exif(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/30/IMG_7408.JPG", 1151066), @@ -147,9 +157,9 @@ def test_download_photos_and_set_exif(self): '2018/07/31/IMG_7409.MOV', ] - os.makedirs(os.path.join(base_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/30/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) # Download the first photo, but mock the video download @@ -188,7 +198,9 @@ def mocked_download(self, size): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -198,18 +210,18 @@ def mocked_download(self, size): self._caplog.text, ) self.assertIn( - f"INFO Downloading 4 original photos and videos to {base_dir} ...", + f"INFO Downloading 4 original photos and videos to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) # 2018:07:31 07:22:24 utc expectedDatetime = datetime.datetime( 2018, 7, 31, 7, 22, 24, tzinfo=datetime.timezone.utc).astimezone().strftime("%Y-%m-%d %H:%M:%S%z") self.assertIn( - f"DEBUG Setting EXIF timestamp for {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}: {expectedDatetime}", + f"DEBUG Setting EXIF timestamp for {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}: {expectedDatetime}", self._caplog.text, ) self.assertIn( @@ -218,18 +230,22 @@ def mocked_download(self, size): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_create) + len(files_to_download) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_download_photos_and_get_exif_exceptions(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/07/31/IMG_7409.JPG' @@ -259,7 +275,9 @@ def test_download_photos_and_get_exif_exceptions(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -267,19 +285,19 @@ def test_download_photos_and_get_exif_exceptions(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( - f"DEBUG Error fetching EXIF data for {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Error fetching EXIF data for {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( - f"DEBUG Error setting EXIF data for {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Error setting EXIF data for {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -288,17 +306,21 @@ def test_download_photos_and_get_exif_exceptions(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_skip_existing_downloads(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/31/IMG_7409.JPG", 1884695), @@ -308,9 +330,9 @@ def test_skip_existing_downloads(self): files_to_download = [ ] - os.makedirs(os.path.join(base_dir, "2018/07/31/")) + os.makedirs(os.path.join(data_dir, "2018/07/31/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): @@ -333,7 +355,9 @@ def test_skip_existing_downloads(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -342,15 +366,15 @@ def test_skip_existing_downloads(self): "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text ) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists", self._caplog.text, ) self.assertIn( @@ -359,21 +383,25 @@ def test_skip_existing_downloads(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_download) + len(files_to_create) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_until_found(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") - os.makedirs(os.path.join(base_dir, "2018/07/30/")) - os.makedirs(os.path.join(base_dir, "2018/07/31/")) + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) + + os.makedirs(os.path.join(data_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/31/")) files_to_download = [] files_to_skip = [] @@ -398,7 +426,7 @@ def test_until_found(self): files_to_download.append(("2018/07/30/IMG_7399-medium.MOV", "photo")) for f in files_to_skip: - with open(os.path.join(base_dir, f[0]), "a") as fi: + with open(os.path.join(data_dir, f[0]), "a") as fi: fi.truncate(f[2]) with mock.patch("icloudpd.download.download_media") as dp_patched: @@ -427,7 +455,9 @@ def test_until_found(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -436,7 +466,7 @@ def test_until_found(self): map( lambda f: call( ANY, False, ANY, ANY, os.path.join( - base_dir, os.path.normpath(f[0])), + data_dir, os.path.normpath(f[0])), "mediumVideo" if ( f[1] == 'photo' and f[0].endswith('.MOV') ) else "original"), @@ -449,12 +479,12 @@ def test_until_found(self): "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text ) self.assertIn( - f"INFO Downloading ??? original photos and videos to {base_dir} ...", + f"INFO Downloading ??? original photos and videos to {data_dir} ...", self._caplog.text, ) for f in files_to_skip: - expected_message = f"DEBUG {os.path.join(base_dir, os.path.normpath(f[0]))} already exists" + expected_message = f"DEBUG {os.path.join(data_dir, os.path.normpath(f[0]))} already exists" self.assertIn(expected_message, self._caplog.text) self.assertIn( @@ -462,25 +492,29 @@ def test_until_found(self): self._caplog.text, ) self.assertNotIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists", self._caplog.text ) assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_skip) # we faked downloading for file_name in ([file_name for (file_name, _, _) in files_to_skip]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_handle_io_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): with mock.patch("icloudpd.download.open", create=True) as m: @@ -505,7 +539,9 @@ def test_handle_io_error(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -513,12 +549,12 @@ def test_handle_io_error(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( "ERROR IOError while writing file to " - f"{os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}. " + f"{os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}. " "You might have run out of disk space, or the file might " "be too large for your OS. Skipping this file...", self._caplog.text, @@ -526,18 +562,22 @@ def test_handle_io_error(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_session_error_during_download(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): def mock_raise_response_error(arg): - raise PyiCloudAPIResponseError("Invalid global session", 100) + raise PyiCloudAPIResponseException("Invalid global session", 100) with mock.patch("time.sleep") as sleep_mock: with mock.patch.object(PhotoAsset, "download") as pa_download: @@ -574,7 +614,9 @@ def mocked_authenticate(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -597,18 +639,22 @@ def mocked_authenticate(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_session_error_during_photo_iteration(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): def mock_raise_response_error(offset): - raise PyiCloudAPIResponseError("Invalid global session", 100) + raise PyiCloudAPIResponseException("Invalid global session", 100) with mock.patch("time.sleep") as sleep_mock: with mock.patch.object(PhotoAlbum, "photos_request") as pa_photos_request: @@ -645,7 +691,9 @@ def mocked_authenticate(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -668,13 +716,17 @@ def mocked_authenticate(self): assert result.exit_code == 1 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_connection_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): # Pass fixed client ID via environment variable @@ -716,7 +768,9 @@ def mocked_authenticate(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -736,19 +790,23 @@ def mocked_authenticate(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_albums_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): # Pass fixed client ID via environment variable def mock_raise_response_error(): - raise PyiCloudAPIResponseError("Api Error", 100) + raise PyiCloudAPIResponseException("Api Error", 100) with mock.patch.object(PhotoLibrary, "_fetch_folders") as pa_photos_request: pa_photos_request.side_effect = mock_raise_response_error @@ -784,7 +842,9 @@ def mocked_authenticate(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -792,13 +852,17 @@ def mocked_authenticate(self): assert result.exit_code == 1 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_missing_size(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with mock.patch.object(PhotoAsset, "download") as pa_download: pa_download.return_value = False @@ -821,7 +885,9 @@ def test_missing_size(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -830,7 +896,7 @@ def test_missing_size(self): "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text ) self.assertIn( - f"INFO Downloading 3 original photos and videos to {base_dir} ...", + f"INFO Downloading 3 original photos and videos to {data_dir} ...", self._caplog.text, ) @@ -851,13 +917,17 @@ def test_missing_size(self): self.assertEqual(result.exit_code, 0, "Exit code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) self.assertEqual(sum(1 for _ in files_in_result), 0, "Files in result") def test_size_fallback_to_original(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with mock.patch("icloudpd.download.download_media") as dp_patched: dp_patched.return_value = True @@ -888,7 +958,9 @@ def test_size_fallback_to_original(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -897,11 +969,11 @@ def test_size_fallback_to_original(self): self._caplog.text, ) self.assertIn( - f"INFO Downloading the first thumb photo or video to {base_dir} ...", + f"INFO Downloading the first thumb photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -912,20 +984,24 @@ def test_size_fallback_to_original(self): False, ANY, ANY, - f"{os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"{os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", "original", ) assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_force_size(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with mock.patch("icloudpd.download.download_media") as dp_patched: dp_patched.return_value = True @@ -954,7 +1030,9 @@ def test_force_size(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -964,7 +1042,7 @@ def test_force_size(self): self._caplog.text, ) self.assertIn( - f"INFO Downloading the first thumb photo or video to {base_dir} ...", + f"INFO Downloading the first thumb photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -979,13 +1057,17 @@ def test_force_size(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_invalid_creation_date(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/01/01/IMG_7409.JPG' @@ -1018,7 +1100,9 @@ def astimezone(self, tz=None): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1028,7 +1112,7 @@ def astimezone(self, tz=None): self._caplog.text, ) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -1036,7 +1120,7 @@ def astimezone(self, tz=None): self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/01/01/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/01/01/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -1045,12 +1129,12 @@ def astimezone(self, tz=None): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" @pytest.mark.skipif(sys.platform == 'win32', @@ -1059,7 +1143,11 @@ def astimezone(self, tz=None): reason="does not run on mac") def test_invalid_creation_year(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '5/01/01/IMG_7409.JPG' @@ -1092,7 +1180,9 @@ def astimezone(self, tz=None): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1102,7 +1192,7 @@ def astimezone(self, tz=None): self._caplog.text, ) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -1110,7 +1200,7 @@ def astimezone(self, tz=None): self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('5/01/01/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('5/01/01/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -1119,17 +1209,21 @@ def astimezone(self, tz=None): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_unknown_item_type(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with mock.patch("icloudpd.download.download_media") as dp_patched: dp_patched.return_value = True @@ -1155,7 +1249,9 @@ def test_unknown_item_type(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1165,7 +1261,7 @@ def test_unknown_item_type(self): self._caplog.text, ) self.assertIn( - f"INFO Downloading the first original photo or video to {base_dir} ...", + f"INFO Downloading the first original photo or video to {data_dir} ...", self._caplog.text, ) self.assertIn( @@ -1180,23 +1276,27 @@ def test_unknown_item_type(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_download_and_dedupe_existing_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) - os.makedirs(os.path.join(base_dir, os.path.normpath("2018/07/31/"))) - with open(os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), "a") as f: + os.makedirs(os.path.join(data_dir, os.path.normpath("2018/07/31/"))) + with open(os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), "a") as f: f.truncate(1) - with open(os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), "a") as f: + with open(os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), "a") as f: f.truncate(1) - os.makedirs(os.path.join(base_dir, os.path.normpath("2018/07/30/"))) - with open(os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), "a") as f: + os.makedirs(os.path.join(data_dir, os.path.normpath("2018/07/30/"))) + with open(os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), "a") as f: f.truncate(1151066) - with open(os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), "a") as f: + with open(os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), "a") as f: f.truncate(1606512) # Download the first photo, but mock the video download @@ -1228,9 +1328,11 @@ def mocked_download(self, size): # "--set-exif-datetime", "--no-progress-bar", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, "--threads-num", - "1" + "1", ], ) print_result_exception(result) @@ -1238,31 +1340,31 @@ def mocked_download(self, size): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 5 original photos to {base_dir} ...", + f"INFO Downloading 5 original photos to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))}", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))}", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists", self._caplog.text, ) self.assertIn( @@ -1277,19 +1379,19 @@ def mocked_download(self, size): # Check that file was downloaded self.assertTrue( - os.path.exists(os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409-1884695.JPG")))) + os.path.exists(os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409-1884695.JPG")))) # Check that mtime was updated to the photo creation date photo_mtime = os.path.getmtime(os.path.join( - base_dir, os.path.normpath("2018/07/31/IMG_7409-1884695.JPG"))) + data_dir, os.path.normpath("2018/07/31/IMG_7409-1884695.JPG"))) photo_modified_time = datetime.datetime.utcfromtimestamp( photo_mtime) self.assertEqual( "2018-07-31 07:22:24", photo_modified_time.strftime('%Y-%m-%d %H:%M:%S')) self.assertTrue( - os.path.exists(os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409-3294075.MOV")))) + os.path.exists(os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409-3294075.MOV")))) photo_mtime = os.path.getmtime(os.path.join( - base_dir, os.path.normpath("2018/07/31/IMG_7409-3294075.MOV"))) + data_dir, os.path.normpath("2018/07/31/IMG_7409-3294075.MOV"))) photo_modified_time = datetime.datetime.utcfromtimestamp( photo_mtime) self.assertEqual( @@ -1300,7 +1402,11 @@ def mocked_download(self, size): def test_download_photos_and_set_exif_exceptions(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/07/31/IMG_7409.JPG' @@ -1333,7 +1439,9 @@ def test_download_photos_and_set_exif_exceptions(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1341,22 +1449,22 @@ def test_download_photos_and_set_exif_exceptions(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) # 2018:07:31 07:22:24 utc expectedDatetime = datetime.datetime( 2018, 7, 31, 7, 22, 24, tzinfo=datetime.timezone.utc).astimezone().strftime("%Y-%m-%d %H:%M:%S%z") self.assertIn( - f"DEBUG Setting EXIF timestamp for {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}: {expectedDatetime}", + f"DEBUG Setting EXIF timestamp for {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}: {expectedDatetime}", self._caplog.text, ) self.assertIn( - f"DEBUG Error setting EXIF data for {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Error setting EXIF data for {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -1365,18 +1473,22 @@ def test_download_photos_and_set_exif_exceptions(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_download_chinese(self): base_dir = os.path.join( self.fixtures_path, inspect.stack()[0][3], "中文") - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/07/31/IMG_7409.JPG' @@ -1403,7 +1515,9 @@ def test_download_chinese(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1411,11 +1525,11 @@ def test_download_chinese(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f'INFO Downloading the first original photo to {base_dir} ...', + f'INFO Downloading the first original photo to {data_dir} ...', self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertNotIn( @@ -1428,10 +1542,10 @@ def test_download_chinese(self): # Check that file was downloaded self.assertTrue( - os.path.exists(os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG')))) + os.path.exists(os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG')))) # Check that mtime was updated to the photo creation date photo_mtime = os.path.getmtime(os.path.join( - base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))) + data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))) photo_modified_time = datetime.datetime.utcfromtimestamp( photo_mtime) self.assertEqual( @@ -1441,17 +1555,21 @@ def test_download_chinese(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_download_after_delete(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/07/31/IMG_7409.JPG' @@ -1484,7 +1602,9 @@ def test_download_after_delete(self): 1, "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1492,11 +1612,11 @@ def test_download_after_delete(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -1509,17 +1629,21 @@ def test_download_after_delete(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_download_after_delete_fail(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos_no_delete.yml")) as cass: # Pass fixed client ID via environment variable @@ -1542,7 +1666,9 @@ def test_download_after_delete_fail(self): 1, "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1550,11 +1676,11 @@ def test_download_after_delete_fail(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertNotIn( @@ -1567,13 +1693,17 @@ def test_download_after_delete_fail(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_download_over_old_original_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/30/IMG_7408-original.JPG", 1151066), @@ -1584,9 +1714,9 @@ def test_download_over_old_original_photos(self): '2018/07/31/IMG_7409.JPG' ] - os.makedirs(os.path.join(base_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/30/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): @@ -1610,7 +1740,9 @@ def test_download_over_old_original_photos(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1618,11 +1750,11 @@ def test_download_over_old_original_photos(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading 5 original photos to {base_dir} ...", + f"INFO Downloading 5 original photos to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertNotIn( @@ -1630,11 +1762,11 @@ def test_download_over_old_original_photos(self): self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", + f"DEBUG {os.path.join(data_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", self._caplog.text, ) self.assertIn( @@ -1651,10 +1783,10 @@ def test_download_over_old_original_photos(self): # Check that file was downloaded self.assertTrue( - os.path.exists(os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")))) + os.path.exists(os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")))) # Check that mtime was updated to the photo creation date photo_mtime = os.path.getmtime(os.path.join( - base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG"))) + data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG"))) photo_modified_time = datetime.datetime.utcfromtimestamp( photo_mtime) self.assertEqual( @@ -1664,18 +1796,22 @@ def test_download_over_old_original_photos(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_download) + len(files_to_create) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_download_normalized_names(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/30/IMG_7408.JPG", 1151066), @@ -1689,9 +1825,9 @@ def test_download_normalized_names(self): '2018/07/31/i_n v_a_l_i_d_p_a_t_h_.JPG' ] - os.makedirs(os.path.join(base_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/30/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos_bad_filename.yml")): @@ -1715,7 +1851,9 @@ def test_download_normalized_names(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1723,19 +1861,23 @@ def test_download_normalized_names(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_create) + len(files_to_download) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" @pytest.mark.skip("not ready yet. may be not needed") def test_download_watch(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_create = [ ("2018/07/30/IMG_7408.JPG", 1151066), @@ -1746,9 +1888,9 @@ def test_download_watch(self): '2018/07/31/IMG_7409.JPG' ] - os.makedirs(os.path.join(base_dir, "2018/07/30/")) + os.makedirs(os.path.join(data_dir, "2018/07/30/")) for (file_name, file_size) in files_to_create: - with open(os.path.join(base_dir, file_name), "a") as f: + with open(os.path.join(data_dir, file_name), "a") as f: f.truncate(file_size) def my_sleep(target_duration): @@ -1785,9 +1927,11 @@ def sleep_(duration): "--threads-num", 1, "-d", - base_dir, + data_dir, "--watch-with-interval", - target_duration + target_duration, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1795,23 +1939,27 @@ def sleep_(duration): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len( files_to_create) + len(files_to_download) for file_name in files_to_download + ([file_name for (file_name, _) in files_to_create]): - assert os.path.exists(os.path.join(base_dir, os.path.normpath( + assert os.path.exists(os.path.join(data_dir, os.path.normpath( file_name))), f"File {file_name} expected, but does not exist" def test_handle_internal_error_during_download(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): def mock_raise_response_error(arg): - raise PyiCloudAPIResponseError( + raise PyiCloudAPIResponseException( "INTERNAL_ERROR", "INTERNAL_ERROR") with mock.patch("time.sleep") as sleep_mock: @@ -1837,7 +1985,9 @@ def mock_raise_response_error(arg): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1859,18 +2009,22 @@ def mock_raise_response_error(arg): self.assertEqual(result.exit_code, 0, "Exit Code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_internal_error_during_photo_iteration(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): def mock_raise_response_error(offset): - raise PyiCloudAPIResponseError( + raise PyiCloudAPIResponseException( "INTERNAL_ERROR", "INTERNAL_ERROR") with mock.patch("time.sleep") as sleep_mock: @@ -1896,7 +2050,9 @@ def mock_raise_response_error(offset): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1919,13 +2075,17 @@ def mock_raise_response_error(offset): self.assertEqual(result.exit_code, 1, "Exit Code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_handle_io_error_mkdir(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): with mock.patch("os.makedirs", create=True) as m: @@ -1950,7 +2110,9 @@ def test_handle_io_error_mkdir(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -1958,24 +2120,28 @@ def test_handle_io_error_mkdir(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"ERROR Could not create folder {base_dir}", + f"ERROR Could not create folder {data_dir}", self._caplog.text, ) self.assertEqual(result.exit_code, 0, "Exit code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) self.assertEqual(sum(1 for _ in files_in_result), 0, "Files at the end") def test_dry_run(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ '2018/07/31/IMG_7409.JPG', @@ -2005,7 +2171,9 @@ def test_dry_run(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -2013,12 +2181,12 @@ def test_dry_run(self): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) # self.assertIn( - # f"INFO Downloading 2 original photos to {base_dir} ...", + # f"INFO Downloading 2 original photos to {data_dir} ...", # self._caplog.text, # ) for f in files_to_download: self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath(f))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath(f))}", self._caplog.text, ) self.assertNotIn( @@ -2044,14 +2212,18 @@ def test_dry_run(self): assert result.exit_code == 0 files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) self.assertEqual(sum(1 for _ in files_in_result), 0, "Files in the result") def test_download_after_delete_dry_run(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) def raise_response_error(a0_, a1_, a2_): raise Exception("Unexpected call to delete_photo") @@ -2089,7 +2261,9 @@ def raise_response_error(a0_, a1_, a2_): 1, "--delete-after-download", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -2097,11 +2271,11 @@ def raise_response_error(a0_, a1_, a2_): self.assertIn( "DEBUG Looking up all photos from album All Photos...", self._caplog.text) self.assertIn( - f"INFO Downloading the first original photo to {base_dir} ...", + f"INFO Downloading the first original photo to {data_dir} ...", self._caplog.text, ) self.assertIn( - f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", + f"DEBUG Downloading {os.path.join(data_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))}", self._caplog.text, ) self.assertIn( @@ -2115,7 +2289,7 @@ def raise_response_error(a0_, a1_, a2_): self.assertEqual(result.exit_code, 0, "Exit code") files_in_result = glob.glob(os.path.join( - base_dir, "**/*.*"), recursive=True) + data_dir, "**/*.*"), recursive=True) self.assertEqual(sum(1 for _ in files_in_result), 0, "Files in the result") diff --git a/tests/test_email_notifications.py b/tests/test_email_notifications.py index 320070526..40c5d3157 100644 --- a/tests/test_email_notifications.py +++ b/tests/test_email_notifications.py @@ -25,9 +25,13 @@ def inject_fixtures(self, caplog): @freeze_time("2018-01-01") def test_2sa_required_email_notification(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") - with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2sa.yml")): + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2fa.yml")): with patch("smtplib.SMTP") as smtp: # Pass fixed client ID via environment variable runner = CliRunner(env={ @@ -47,7 +51,9 @@ def test_2sa_required_email_notification(self): "--notification-email", "jdoe+notifications@gmail.com", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print(result.output) @@ -73,9 +79,13 @@ def test_2sa_required_email_notification(self): @freeze_time("2018-01-01") def test_2sa_notification_without_smtp_login_and_tls(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) - with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2sa.yml")): + with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2fa.yml")): with patch("smtplib.SMTP") as smtp: # Pass fixed client ID via environment variable runner = CliRunner(env={ @@ -92,7 +102,9 @@ def test_2sa_notification_without_smtp_login_and_tls(self): "--notification-email", "jdoe+notifications@gmail.com", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print(result.output) @@ -116,9 +128,13 @@ def test_2sa_notification_without_smtp_login_and_tls(self): @freeze_time("2018-01-01") def test_2sa_required_notification_script(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") - with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2sa.yml")): + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2fa.yml")): with patch("subprocess.call") as subprocess_patched: # Pass fixed client ID via environment variable runner = CliRunner(env={ @@ -134,7 +150,9 @@ def test_2sa_required_notification_script(self): "--notification-script", "./test_script.sh", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print(result.output) @@ -144,9 +162,13 @@ def test_2sa_required_notification_script(self): @freeze_time("2018-01-01") def test_2sa_required_email_notification_from(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) - with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2sa.yml")): + with vcr.use_cassette(os.path.join(self.vcr_path, "auth_requires_2fa.yml")): with patch("smtplib.SMTP") as smtp: # Pass fixed client ID via environment variable runner = CliRunner(env={ @@ -168,7 +190,9 @@ def test_2sa_required_email_notification_from(self): "--notification-email-from", "JD ", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print(result.output) diff --git a/tests/test_folder_structure.py b/tests/test_folder_structure.py index edb7f027f..8e0725674 100644 --- a/tests/test_folder_structure.py +++ b/tests/test_folder_structure.py @@ -25,7 +25,11 @@ def inject_fixtures(self, caplog): def test_default_folder_structure(self): ### Tests if the default directory structure is constructed correctly ### base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [ ] @@ -48,7 +52,9 @@ def test_default_folder_structure(self): "--only-print-filenames", "--no-progress-bar", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -56,43 +62,47 @@ def test_default_folder_structure(self): self.assertEqual(len(filenames), 8) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), filenames[0] + os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), filenames[0] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), filenames[1] + os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), filenames[1] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), filenames[2] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), filenames[2] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), filenames[3] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), filenames[3] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7407.JPG")), filenames[4] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7407.JPG")), filenames[4] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7407.MOV")), filenames[5] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7407.MOV")), filenames[5] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7405.MOV")), filenames[6] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7405.MOV")), filenames[6] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7404.MOV")), filenames[7] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7404.MOV")), filenames[7] ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath(file_name))), f"File {file_name} expected, but does not exist" + assert os.path.exists(os.path.join(data_dir, os.path.normpath(file_name))), f"File {file_name} expected, but does not exist" def test_folder_structure_none(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) files_to_download = [] @@ -115,7 +125,9 @@ def test_folder_structure_none(self): "--folder-structure=none", "--no-progress-bar", "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -123,36 +135,36 @@ def test_folder_structure_none(self): self.assertEqual(len(filenames), 8) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7409.JPG")), filenames[0] + os.path.join(data_dir, os.path.normpath("IMG_7409.JPG")), filenames[0] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7409.MOV")), filenames[1] + os.path.join(data_dir, os.path.normpath("IMG_7409.MOV")), filenames[1] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7408.JPG")), filenames[2] + os.path.join(data_dir, os.path.normpath("IMG_7408.JPG")), filenames[2] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7408.MOV")), filenames[3] + os.path.join(data_dir, os.path.normpath("IMG_7408.MOV")), filenames[3] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7407.JPG")), filenames[4] + os.path.join(data_dir, os.path.normpath("IMG_7407.JPG")), filenames[4] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7407.MOV")), filenames[5] + os.path.join(data_dir, os.path.normpath("IMG_7407.MOV")), filenames[5] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7405.MOV")), filenames[6] + os.path.join(data_dir, os.path.normpath("IMG_7405.MOV")), filenames[6] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("IMG_7404.MOV")), filenames[7] + os.path.join(data_dir, os.path.normpath("IMG_7404.MOV")), filenames[7] ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == len(files_to_download) for file_name in files_to_download: - assert os.path.exists(os.path.join(base_dir, os.path.normpath(file_name))), f"File {file_name} expected, but does not exist" + assert os.path.exists(os.path.join(data_dir, os.path.normpath(file_name))), f"File {file_name} expected, but does not exist" diff --git a/tests/test_listing_albums.py b/tests/test_listing_albums.py index 3c522cf9e..7bd9c66fc 100644 --- a/tests/test_listing_albums.py +++ b/tests/test_listing_albums.py @@ -25,7 +25,11 @@ def inject_fixtures(self, caplog): def test_listing_albums(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_albums.yml")): # Pass fixed client ID via environment variable @@ -41,6 +45,8 @@ def test_listing_albums(self): "password1", "--list-albums", "--no-progress-bar", + "--cookie-directory", + cookie_dir, ], ) @@ -55,6 +61,6 @@ def test_listing_albums(self): assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 diff --git a/tests/test_listing_libraries.py b/tests/test_listing_libraries.py index de9bc9764..a3d13b89b 100644 --- a/tests/test_listing_libraries.py +++ b/tests/test_listing_libraries.py @@ -25,7 +25,10 @@ def inject_fixtures(self, caplog): def test_listing_library(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_albums.yml")): # Pass fixed client ID via environment variable @@ -40,7 +43,9 @@ def test_listing_library(self): "--password", "password1", "--list-libraries", - "--no-progress-bar" + "--no-progress-bar", + "--cookie-directory", + cookie_dir, ], ) @@ -54,7 +59,11 @@ def test_listing_library(self): def test_listing_library_error(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) with vcr.use_cassette(os.path.join(self.vcr_path, "listing_albums.yml")): # Pass fixed client ID via environment variable @@ -72,16 +81,18 @@ def test_listing_library_error(self): "doesnotexist", "--no-progress-bar", "-d", - base_dir + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) - + self.assertIn( "ERROR Unknown library: doesnotexist", self._caplog.text, ) - + assert result.exit_code == 1 diff --git a/tests/test_listing_recent_photos.py b/tests/test_listing_recent_photos.py index e446cd3ae..63e72d709 100644 --- a/tests/test_listing_recent_photos.py +++ b/tests/test_listing_recent_photos.py @@ -24,7 +24,11 @@ def inject_fixtures(self, caplog): def test_listing_recent_photos(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) # Note - This test uses the same cassette as test_download_photos.py with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): @@ -46,51 +50,57 @@ def test_listing_recent_photos(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) filenames = result.output.splitlines() self.assertEqual(len(filenames), 8) - self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), filenames[0] + self.assertIn( + os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.JPG")), filenames[0] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), filenames[1] + os.path.join(data_dir, os.path.normpath("2018/07/31/IMG_7409.MOV")), filenames[1] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), filenames[2] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), filenames[2] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), filenames[3] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), filenames[3] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7407.JPG")), filenames[4] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7407.JPG")), filenames[4] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7407.MOV")), filenames[5] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7407.MOV")), filenames[5] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7405.MOV")), filenames[6] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7405.MOV")), filenames[6] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7404.MOV")), filenames[7] + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7404.MOV")), filenames[7] ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_listing_photos_does_not_create_folders(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) # make sure the directory does not exist yet. # Should only be created after download, not after just --print-filenames - self.assertFalse(os.path.exists(os.path.join(base_dir, os.path.normpath("2018/07/31")))) + self.assertFalse(os.path.exists(os.path.join(data_dir, os.path.normpath("2018/07/31")))) # Note - This test uses the same cassette as test_download_photos.py with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos.yml")): @@ -112,24 +122,30 @@ def test_listing_photos_does_not_create_folders(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) # make sure the directory still does not exist. # Should only be created after download, not after just --print-filenames self.assertFalse( - os.path.exists(os.path.join(base_dir, os.path.normpath("2018/07/31")))) + os.path.exists(os.path.join(data_dir, os.path.normpath("2018/07/31")))) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 def test_listing_recent_photos_with_missing_filenameEnc(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) # Note - This test uses the same cassette as test_download_photos.py with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos_missing_filenameEnc.yml")): @@ -153,7 +169,9 @@ def test_listing_recent_photos_with_missing_filenameEnc(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -164,28 +182,28 @@ def test_listing_recent_photos_with_missing_filenameEnc(self): # self.assertEqual(len(filenames), 5) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/AY6c_BsE0jja.JPG")), + os.path.join(data_dir, os.path.normpath("2018/07/31/AY6c_BsE0jja.JPG")), filenames[0] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/31/AY6c_BsE0jja.MOV")), + os.path.join(data_dir, os.path.normpath("2018/07/31/AY6c_BsE0jja.MOV")), filenames[1] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.JPG")), filenames[2] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), + os.path.join(data_dir, os.path.normpath("2018/07/30/IMG_7408.MOV")), filenames[3] ) self.assertEqual( - os.path.join(base_dir, os.path.normpath("2018/07/30/AZ_wAGT9P6jh.JPG")), + os.path.join(data_dir, os.path.normpath("2018/07/30/AZ_wAGT9P6jh.JPG")), filenames[4] ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 @@ -193,7 +211,11 @@ def test_listing_recent_photos_with_missing_filenameEnc(self): # another case where it might crash. (Maybe Apple changes the downloadURL key) def test_listing_recent_photos_with_missing_downloadURL(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + data_dir = os.path.join(base_dir, "data") + + for dir in [base_dir, cookie_dir, data_dir]: + recreate_path(dir) # Note - This test uses the same cassette as test_download_photos.py with vcr.use_cassette(os.path.join(self.vcr_path, "listing_photos_missing_downloadUrl.yml")): @@ -217,7 +239,9 @@ def test_listing_recent_photos_with_missing_downloadURL(self): "--threads-num", 1, "-d", - base_dir, + data_dir, + "--cookie-directory", + cookie_dir, ], ) print_result_exception(result) @@ -232,9 +256,10 @@ def test_listing_recent_photos_with_missing_downloadURL(self): """ , result.output) mock_open.assert_called_once_with(file='icloudpd-photo-error.json', mode='w', encoding='utf8') - mock_json.assert_called_once() + # Multiple JSON "dumps" occur with the new pyicloud 1.0.0 implementation + # mock_json.assert_called_once() # Check a few keys in the dict - first_arg = mock_json.call_args_list[0][0][0] + first_arg = mock_json.call_args_list[8][0][0] self.assertEqual( first_arg['master_record']['recordName'], 'AY6c+BsE0jjaXx9tmVGJM1D2VcEO') @@ -249,6 +274,6 @@ def test_listing_recent_photos_with_missing_downloadURL(self): 1533021744816) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + files_in_result = glob.glob(os.path.join(data_dir, "**/*.*"), recursive=True) assert sum(1 for _ in files_in_result) == 0 diff --git a/tests/test_two_step_auth.py b/tests/test_two_step_auth.py index a0c3bd3ed..77642c5c0 100644 --- a/tests/test_two_step_auth.py +++ b/tests/test_two_step_auth.py @@ -24,11 +24,14 @@ def inject_fixtures(self, caplog): self.fixtures_path = os.path.join(self.root_path, "fixtures") self.vcr_path = os.path.join(self.root_path, "vcr_cassettes") - def test_2sa_flow_invalid_device_2fa(self): + def test_2sa_flow_invalid_code(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") - with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_invalid_device.yml")): + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_invalid_code.yml")): runner = CliRunner(env={ "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" }) @@ -39,13 +42,12 @@ def test_2sa_flow_invalid_device_2fa(self): "jdoe@gmail.com", "--password", "password1", - "--recent", - "0", "--no-progress-bar", - "-d", - base_dir, + "--cookie-directory", + cookie_dir, + "--auth-only" ], - input="1\n901431\n", + input="0\n901431\n", ) self.assertIn( "ERROR Failed to verify two-factor authentication code", @@ -54,66 +56,14 @@ def test_2sa_flow_invalid_device_2fa(self): assert result.exit_code == 1 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) - - assert sum(1 for _ in files_in_result) == 0 - - def test_2sa_flow_device_2fa(self): + def test_2sa_flow_valid_code(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") - with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_device.yml")): - runner = CliRunner(env={ - "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" - }) - result = runner.invoke( - main, - [ - "--username", - "jdoe@gmail.com", - "--password", - "password1", - "--recent", - "0", - "--no-progress-bar", - "-d", - base_dir, - ], - input="1\n654321\n", - ) - self.assertIn("DEBUG Authenticating...", self._caplog.text) - self.assertIn( - "INFO Two-step/two-factor authentication is required", - self._caplog.text, - ) - self.assertIn(" 0: SMS to *******03", result.output) - self.assertIn(" 1: Enter two-factor authentication code", result.output) - self.assertIn("Please choose an option: [0]: 1", result.output) - self.assertIn( - "Please enter two-factor authentication code: 654321", result.output - ) - self.assertIn( - "INFO Great, you're all set up. The script can now be run without " - "user interaction until 2SA expires.", - self._caplog.text, - ) - self.assertIn( - "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text - ) - self.assertIn( - "INFO All photos have been downloaded", self._caplog.text - ) - assert result.exit_code == 0 - - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) - - assert sum(1 for _ in files_in_result) == 0 - - def test_2sa_flow_sms(self): - base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + for dir in [base_dir, cookie_dir]: + recreate_path(dir) - with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_sms.yml")): + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_code.yml")): runner = CliRunner(env={ "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" }) @@ -124,13 +74,12 @@ def test_2sa_flow_sms(self): "jdoe@gmail.com", "--password", "password1", - "--recent", - "0", "--no-progress-bar", - "-d", - base_dir, + "--cookie-directory", + cookie_dir, + "--auth-only", ], - input="0\n123456\n", + input="0\n654321\n", ) self.assertIn("DEBUG Authenticating...", self._caplog.text) self.assertIn( @@ -138,33 +87,25 @@ def test_2sa_flow_sms(self): self._caplog.text, ) self.assertIn(" 0: SMS to *******03", result.output) - self.assertIn(" 1: Enter two-factor authentication code", result.output) self.assertIn("Please choose an option: [0]: 0", result.output) self.assertIn( - "Please enter two-factor authentication code: 123456", result.output + "Please enter two-factor authentication code: 654321", result.output ) self.assertIn( "INFO Great, you're all set up. The script can now be run without " "user interaction until 2SA expires.", self._caplog.text, ) - self.assertIn( - "DEBUG Looking up all photos and videos from album All Photos...", self._caplog.text - ) - self.assertIn( - "INFO All photos have been downloaded", self._caplog.text - ) assert result.exit_code == 0 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) - - assert sum(1 for _ in files_in_result) == 0 - - def test_2sa_flow_sms_failed(self): + def test_2sa_flow_failed_send_code(self): base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) - recreate_path(base_dir) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) - with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_sms.yml")): + with vcr.use_cassette(os.path.join(self.vcr_path, "2sa_flow_valid_code.yml")): with mock.patch.object( PyiCloudService, "send_verification_code" ) as svc_mocked: @@ -179,11 +120,10 @@ def test_2sa_flow_sms_failed(self): "jdoe@gmail.com", "--password", "password1", - "--recent", - "0", "--no-progress-bar", - "-d", - base_dir, + "--cookie-directory", + cookie_dir, + "--auth-only" ], input="0\n", ) @@ -193,9 +133,6 @@ def test_2sa_flow_sms_failed(self): self._caplog.text, ) self.assertIn(" 0: SMS to *******03", result.output) - self.assertIn( - " 1: Enter two-factor authentication code", result.output - ) self.assertIn("Please choose an option: [0]: 0", result.output) self.assertIn( "ERROR Failed to send two-factor authentication code", @@ -203,6 +140,74 @@ def test_2sa_flow_sms_failed(self): ) assert result.exit_code == 1 - files_in_result = glob.glob(os.path.join(base_dir, "**/*.*"), recursive=True) + def test_2fa_flow_invalid_code(self): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) - assert sum(1 for _ in files_in_result) == 0 + with vcr.use_cassette(os.path.join(self.vcr_path, "2fa_flow_invalid_code.yml")): + runner = CliRunner(env={ + "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" + }) + result = runner.invoke( + main, + [ + "--username", + "jdoe@gmail.com", + "--password", + "password1", + "--no-progress-bar", + "--cookie-directory", + cookie_dir, + "--auth-only" + ], + input="901431\n", + ) + self.assertIn( + "ERROR Failed to verify two-factor authentication code", + self._caplog.text, + ) + + assert result.exit_code == 1 + + def test_2fa_flow_valid_code(self): + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "2fa_flow_valid_code.yml")): + runner = CliRunner(env={ + "CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321" + }) + result = runner.invoke( + main, + [ + "--username", + "jdoe@gmail.com", + "--password", + "password1", + "--no-progress-bar", + "--cookie-directory", + cookie_dir, + "--auth-only", + ], + input="654321\n", + ) + self.assertIn("DEBUG Authenticating...", self._caplog.text) + self.assertIn( + "INFO Two-step/two-factor authentication is required", + self._caplog.text, + ) + self.assertIn( + "Please enter two-factor authentication code: 654321", result.output + ) + self.assertIn( + "INFO Great, you're all set up. The script can now be run without " + "user interaction until 2SA expires.", + self._caplog.text, + ) + assert result.exit_code == 0 diff --git a/tests/vcr_cassettes/2fa_flow_invalid_code.yml b/tests/vcr_cassettes/2fa_flow_invalid_code.yml new file mode 100644 index 000000000..9a99effdb --- /dev/null +++ b/tests/vcr_cassettes/2fa_flow_invalid_code.yml @@ -0,0 +1,177 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true, + "isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234","primaryEmailVerified":true, + "aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true, + "fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true}, + "languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false,"firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true}, + "hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p61-drivews.icloud.com:443", + "status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443","status":"active"}, + "ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443", + "status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443", + "status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=", + "accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms", + "vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2, + "isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"securityCode": {"code": "901431"}}' + headers: + Accept: ['application/json'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['36'] + Content-Type: ['application/json'] + Cookie: + - 'dslang=US-EN; site=USA; acn01=acn01-1234567890=; + aasp=aasp-1234567890' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + scnt: ['scnt-1234567890'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode + response: + body: + string: !!python/unicode '{"service_errors": [{"code": "-21669", "title": "Incorrect Verification Code", + "message": "Incorrect verification code.", "suppressDismissal": false} ], "hasError": true}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + - 'no-store' + Connection: ['keep-alive'] + Content-Language: ['en-US-x-lvariant-USA'] + Content-Type: ['application/json;charset=UTF-8'] + Date: ['Sun, 17 Dec 2023 19:43:32 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Set-Cookie: + - 'dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly' + - 'site=USA; Domain=apple.com; Path=/; Secure; HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-I-Ercd: ['-21669'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['203'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 400 + message: '' +version: 1 diff --git a/tests/vcr_cassettes/2fa_flow_valid_code.yml b/tests/vcr_cassettes/2fa_flow_valid_code.yml new file mode 100644 index 000000000..a6bf0ccde --- /dev/null +++ b/tests/vcr_cassettes/2fa_flow_valid_code.yml @@ -0,0 +1,323 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true, + "isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234","primaryEmailVerified":true, + "aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true, + "fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true}, + "languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false,"firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true}, + "hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p61-drivews.icloud.com:443", + "status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443","status":"active"}, + "ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443", + "status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443", + "status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=", + "accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms", + "vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2, + "isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"securityCode": {"code": "654321"}}' + headers: + Accept: ['application/json'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['36'] + Content-Type: ['application/json'] + Cookie: + - 'dslang=US-EN; site=USA; acn01=acn01-1234567890=; + aasp=aasp-1234567890' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + scnt: ['scnt-1234567890'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + - 'no-store' + Connection: ['keep-alive'] + Content-Language: ['en-US-x-lvariant-USA'] + Content-Type: ['application/json;charset=UTF-8'] + Date: ['Sun, 17 Dec 2023 19:43:32 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Set-Cookie: + - 'dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly' + - 'site=USA; Domain=apple.com; Path=/; Secure; HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-Auth-Attributes: ['attr-1234567890'] + X-Apple-OAuth-Grant-Code: ['grantcode-1234567890'] + X-Apple-Session-Token: ['sessiontoken-1234567890'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['203'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 204 + message: '' +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: GET + uri: https://idmsa.apple.com/appleauth/auth/2sv/trust + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + - 'no-store' + Connection: ['keep-alive'] + Content-Language: ['en-US-x-lvariant-USA'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Sun, 17 Dec 2023 19:43:32 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Set-Cookie: + - 'dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly' + - 'site=USA; Domain=apple.com; Path=/; Secure; HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-TwoSV-Trust-Token: ['2svtoken-1234567890'] + X-Apple-Auth-Attributes: ['attr-1234567890'] + X-Apple-OAuth-Grant-Code: ['grantcode-1234567890'] + X-Apple-Session-Token: ['sessiontoken-1234567890'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['203'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 204 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": "2svtoken-1234567890"}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~~";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/2sa_flow_invalid_code.yml b/tests/vcr_cassettes/2sa_flow_invalid_code.yml new file mode 100644 index 000000000..b444dce67 --- /dev/null +++ b/tests/vcr_cassettes/2sa_flow_invalid_code.yml @@ -0,0 +1,237 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R3_2'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true, + "isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":1,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234","primaryEmailVerified":true, + "aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0,"hasICloudQualifyingDevice":false,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true, + "fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true}, + "languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false,"firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true}, + "hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p61-drivews.icloud.com:443", + "status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443","status":"active"}, + "ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443", + "status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443", + "status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=", + "accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms", + "vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2, + "isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: GET + uri: https://setup.icloud.com/setup/ws/1/listDevices?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"devices":[{"deviceType":"SMS","areaCode":"","phoneNumber":"*******03","deviceId":"1"}]}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:54:34 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:21800401:nk11p18ic-setupsvc004:8001:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['89'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceId":"1"}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['82'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/sendVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"success":true}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:54:35 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:34400103:mr26p44ic-tydg07122301:8003:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['16'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceID": "1", + "verificationCode": "901431", "trustBrowser": true}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['52'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/validateVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"success":false,"errorTitle":"Invalid Code","errorMessage":"The + code you entered is not valid.","errorCode":-21669}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:57:30 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:34600403:mr25p46ic-tydg01141201:8003:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['116'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/2sa_flow_invalid_device.yml b/tests/vcr_cassettes/2sa_flow_invalid_device.yml deleted file mode 100644 index 1adb764c2..000000000 --- a/tests/vcr_cassettes/2sa_flow_invalid_device.yml +++ /dev/null @@ -1,137 +0,0 @@ -interactions: -- request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 - response: - body: {string: '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"ab6bfad3-e110-414f-9be0-125eff24efae","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:54:33 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [VNV7VU7BCBAU7G7ACJPP6JHPVY] - X-Apple-Request-UUID: [ab6bfad3-e110-414f-9be0-125eff24efae] - X-Responding-Instance: ['setupservice:11700403:st13p17ic-setupsvc004:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p01ic-ztde010418:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: GET - uri: https://setup.icloud.com/setup/ws/1/listDevices?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"devices":[{"deviceType":"SMS","areaCode":"","phoneNumber":"*******03","deviceId":"1"}]}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:54:34 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [HZN37F7FIVEQLMEB62ZL7MRV4Y] - X-Apple-Request-UUID: [3e5bbf97-e545-4905-b081-f6b2bfb235e6] - X-Responding-Instance: ['setupservice:21800401:nk11p18ic-setupsvc004:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['89'] - via: ['icloudedge:si03p01ic-ztde010418:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceId": - "1"}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['82'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/sendVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"success":true}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:54:35 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [CWUBPOMXINCETCSF3QVGN44BR4] - X-Apple-Request-UUID: [15a817b9-9743-4449-8a45-dc2a66f3818f] - X-Responding-Instance: ['setupservice:34400103:mr26p44ic-tydg07122301:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['16'] - via: ['icloudedge:si03p01ic-ztde010418:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"verificationCode": "901431", "trustBrowser": true}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['52'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/validateVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"success":false,"errorTitle":"Invalid Code","errorMessage":"The - code you entered is not valid.","errorCode":-21669}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:57:30 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [ZXDIZFYF7VC2VFMSYPEOKPT6CM] - X-Apple-Request-UUID: [cdc68c97-05fd-45aa-9592-c3c8e53e7e13] - X-Responding-Instance: ['setupservice:34600403:mr25p46ic-tydg01141201:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['116'] - via: ['icloudedge:si03p01ic-ztde010418:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/vcr_cassettes/2sa_flow_valid_code.yml b/tests/vcr_cassettes/2sa_flow_valid_code.yml new file mode 100644 index 000000000..e32af9649 --- /dev/null +++ b/tests/vcr_cassettes/2sa_flow_valid_code.yml @@ -0,0 +1,348 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R3_2'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":1,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":false,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: GET + uri: https://setup.icloud.com/setup/ws/1/listDevices?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"devices":[{"deviceType":"SMS","areaCode":"","phoneNumber":"*******03","deviceId":"1"}]}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:54:34 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:21800401:nk11p18ic-setupsvc004:8001:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['89'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceId":"1"}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['82'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/sendVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"success":true}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:54:35 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:34400103:mr26p44ic-tydg07122301:8003:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['16'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceID": "1", + "verificationCode": "654321", "trustBrowser": true}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['52'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/validateVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901 + response: + body: + string: !!python/unicode '{"success":true}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:57:30 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:34600403:mr25p46ic-tydg01141201:8003:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['116'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":1,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":false,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/2sa_flow_valid_device.yml b/tests/vcr_cassettes/2sa_flow_valid_device.yml deleted file mode 100644 index 84d2ea80e..000000000 --- a/tests/vcr_cassettes/2sa_flow_valid_device.yml +++ /dev/null @@ -1,935 +0,0 @@ -interactions: -- request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 - response: - body: {string: '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"c708aa87-c850-4704-82fc-344ab9280f4e","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:59:53 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [Y4EKVB6IKBDQJAX4GRFLSKAPJY] - X-Apple-Request-UUID: [c708aa87-c850-4704-82fc-344ab9280f4e] - X-Responding-Instance: ['setupservice:35600203:mr90p56ic-zteg05151001:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: GET - uri: https://setup.icloud.com/setup/ws/1/listDevices?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"devices":[{"deviceType":"SMS","areaCode":"","phoneNumber":"*******03","deviceId":"1"}]}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 09:59:54 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [EJ7XVI3COBEOJGGX64H44XXKLE] - X-Apple-Request-UUID: [227f7aa3-6270-48e4-98d7-f70fce5eea59] - X-Responding-Instance: ['setupservice:36000201:mr29p60ic-tyfb03100201:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['89'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"verificationCode": "654321", "trustBrowser": true}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['52'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/validateVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"success":true}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:10 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [67PUIQNBJZAVVN5QYBUGZSJM7U] - X-Apple-Request-UUID: [f7df4441-a14e-415a-b7b0-c0686cc92cfd] - X-Responding-Instance: ['setupservice:32800401:mr21p28ic-hpaf05183301:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['16'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"12801308-4013-49ad-a45f-4164c48856a6","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:13 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [CKABGCCACNE23JC7IFSMJCCWUY] - X-Apple-Request-UUID: [12801308-4013-49ad-a45f-4164c48856a6] - X-Responding-Instance: ['setupservice:16100401:st42p61ic-tyfb13011001:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_10829b61-3a3e-442f-ac2e-b045ac3776dc\",\n - \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" - : {\n \"value\" : 100,\n \"type\" : \"INT64\"\n },\n \"state\" - : {\n \"value\" : \"FINISHED\",\n \"type\" : \"STRING\"\n }\n - \ },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"0\",\n \"created\" - : {\n \"timestamp\" : 1533031213686,\n \"userRecordName\" : \"_10\",\n - \ \"deviceID\" : \"1\"\n },\n \"modified\" : {\n \"timestamp\" - : 1533031213686,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" - : \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:13 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [5d3e3e67-e078-40dd-9d7f-e10e797f065d] - X-Responding-Instance: ['ckdatabasews:21002201:nk11p10me-ztbu40074101:8201:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['804'] - via: ['xrail:nk11p00ic-ztdj02084001.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070523:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2' - Content-type: - - text/plain - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list - response: - body: - string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n - \ \"zones\" : [ {\n \"zoneID\" : {\n \"zoneName\" : \"PrimarySync\",\n - \ \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"zoneType\" - : \"REGULAR_CUSTOM_ZONE\"\n }\n } ]\n}" - headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Tue, 29 Aug 2023 19:47:27 GMT - Server: - - AppleHttpServer/3faf4ee9434b - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; - Transfer-Encoding: - - chunked - X-Apple-CloudKit-Version: - - '1.0' - X-Apple-Edge-Response-Time: - - '195' - X-Apple-Request-UUID: - - 34046027-8226-46f7-9960-4b0839c08b82 - X-Responding-Instance: - - ckdatabasews:966835083:prod-p121-ckdatabasews-100percent-79bfc6b95d-klrcc:8080:2322B333:13811c3d707a78576fcc7f8962567af12bdfeeb4 - access-control-expose-headers: - - X-Apple-Request-UUID,X-Responding-Instance,Via - content-length: - - '242' - via: - - xrail:icloud-xrail-group53-ext-84bc6d9cdc-z45hs:8301:23R321:grp53,631194250daa17e24277dea86cf30319:b99b663029a8c732254c763aa20830be:nlhfd1 - x-apple-user-partition: - - '121' - status: - code: 200 - message: OK -- request: - body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}, "ownerRecordName": "_bfc6dbbcc77b03e6cebefd28a28f7e2f", "zoneType": - "REGULAR_CUSTOM_ZONE"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_10829b61-3a3e-442f-ac2e-b045ac3776dc\",\n - \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" - : {\n \"value\" : 100,\n \"type\" : \"INT64\"\n },\n \"state\" - : {\n \"value\" : \"FINISHED\",\n \"type\" : \"STRING\"\n }\n - \ },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"0\",\n \"created\" - : {\n \"timestamp\" : 1533031213686,\n \"userRecordName\" : \"_10\",\n - \ \"deviceID\" : \"1\"\n },\n \"modified\" : {\n \"timestamp\" - : 1533031213686,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" - : \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:13 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [5d3e3e67-e078-40dd-9d7f-e10e797f065d] - X-Responding-Instance: ['ckdatabasews:21002201:nk11p10me-ztbu40074101:8201:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['804'] - via: ['xrail:nk11p00ic-ztdj02084001.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070523:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"query":{"recordType":"CPLAlbumByPositionLive"},"zoneID":{"zoneName":"PrimarySync", "ownerRecordName": "_bfc6dbbcc77b03e6cebefd28a28f7e2f", "zoneType": - "REGULAR_CUSTOM_ZONE"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['85'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1502811072713,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 3,\n \"type\" - : \"INT64\"\n },\n \"position\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"30lo\",\n \"created\" : {\n \"timestamp\" - : 1428915378515,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1502811092910,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"402BB76C-1CC8-4CAC-BFC0-61D14E47CBFD\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1514538116387,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"QkxEIENhZmU=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 311,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3uqj\",\n \"created\" - : {\n \"timestamp\" : 1514538434377,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1514538434377,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0F01E221-EF41-4BDD-B37B-FC51A096AA0A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1514436758138,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"TXVyaXdhaSBoaWtl\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 342,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3ufx\",\n \"created\" - : {\n \"timestamp\" : 1514436760099,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1514436760099,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"7FA80E52-3452-4D42-B977-7274B60C21BB\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1491102985455,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"Q2hpYW5nIE1haSBXYWxraW5nIFRvdXJz\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 405,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2oxn\",\n \"created\" - : {\n \"timestamp\" : 1491102987340,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1491102987340,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"93A9BAE1-1311-469B-BD94-1F7E106F253C\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1489922219087,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"RG9pIEludGhhbm9uIE5hdGlvbmFsIFBhcms=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 530,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2mvj\",\n \"created\" - : {\n \"timestamp\" : 1489923559501,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1489923559501,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B2F92ED0-0DBD-43A3-B67D-E72B12DA6DD0\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1482647228648,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"QXJjaGVyeQ==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 780,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2f0s\",\n \"created\" - : {\n \"timestamp\" : 1482647406135,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1482647406135,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"16D6E2B7-8166-4897-98C8-CCF286D1583B\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085161,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"RHVwbGljYXRlIE1hcmtlZCBQaG90b3M=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 1280,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1t0j\",\n \"created\" : {\n \"timestamp\" - : 1463148034917,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"A55BB3A8-D61C-4477-9140-43BEDB30D2A6\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"Q2FtYm9kaWEgVmlkZW9z\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 1536,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1t0i\",\n \"created\" : {\n \"timestamp\" : 1453051964650,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"C9C4F2FF-035E-4D06-90D8-E5D2673769D0\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085193,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"Q2FtYm9kaWE=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 2048,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"1szu\",\n \"created\" - : {\n \"timestamp\" : 1453021524728,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"D9CFF169-CBE6-459B-8098-82037E68A3C1\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085235,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"UGhhIFJvbSBZZW4gV2F0ZXJmYWxs\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 22528,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1t0l\",\n \"created\" : {\n \"timestamp\" - : 1443284819258,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0139E773-D78C-4E73-A9A5-31E9EED854CF\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085193,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"S291YiBDYWZl\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 23552,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0c\",\n - \ \"created\" : {\n \"timestamp\" : 1432233530719,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"44DA1683-B20C-4F93-B51C-B7120A302A7E\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085273,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VGhhaWxhbmQ=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 24576,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0a\",\n - \ \"created\" : {\n \"timestamp\" : 1428920848649,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"4D12353C-67BB-44E5-B585-AC9EFD12AE1D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084285,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"U2thdGluZw==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 25600,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1swk\",\n - \ \"created\" : {\n \"timestamp\" : 1428915378512,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089920,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"79B248C8-2D6B-4331-8E8D-3946DF051DDA\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084294,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VGhlIEhpdmUgLSBCYW5na29r\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 26624,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1sxh\",\n \"created\" : {\n \"timestamp\" - : 1428915378525,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089922,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"3FA34CF7-21AC-46B6-86FF-0A940A6A8F9D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085273,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"5bCP5YG2\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 27648,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t06\",\n - \ \"created\" : {\n \"timestamp\" : 1429952820538,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"28C4A21D3344743592E4A5698F754427CD2ED915258C255ED9EAC4046EFC69B5\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"CEB70636-FCE5-49F9-9007-D3B73BDBC3AC\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SW5zdGFncmFt\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 29696,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0d\",\n - \ \"created\" : {\n \"timestamp\" : 1432492805813,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"28C4A21D3344743592E4A5698F754427CD2ED915258C255ED9EAC4046EFC69B5\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"EB0359B1-2DB4-46B3-9DC3-8066A8FC36E3\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084197,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 3,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"aVBob3RvIEV2ZW50cw==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 30720,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1swg\",\n \"created\" : {\n \"timestamp\" : 1428915378510,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089920,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"35D9D620-30A6-4FBC-8FAD-5ADFB65BB58D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085177,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"REpJIEltcG9ydA==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 31744,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1t07\",\n \"created\" : {\n \"timestamp\" : 1450279170742,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"AD8825B9-6B84-4FF7-B312-81E3FCA2F989\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085161,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"REpJIFdvcmtz\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 32768,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0p\",\n - \ \"created\" : {\n \"timestamp\" : 1450279171363,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0B7CE6FE-E934-4B5C-BFEE-89B6B00E829A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085235,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"U0pDQU0=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 33792,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0n\",\n - \ \"created\" : {\n \"timestamp\" : 1453761571794,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"F75BC6AB-3CA9-491B-9AF5-D902454CA29D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"S28gTGFudGE=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 34304,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1szt\",\n - \ \"created\" : {\n \"timestamp\" : 1454050400955,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"A44BA5C3-60E6-4700-9665-7E4EDD029D7D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085255,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SERXUg==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 35328,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0b\",\n - \ \"created\" : {\n \"timestamp\" : 1459333973952,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"258E9D31-A2B3-4141-BE4A-C58AD8A53C0A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1464325881369,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"RHJvcGJveA==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 36352,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1weh\",\n - \ \"created\" : {\n \"timestamp\" : 1464345825168,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1464345825168,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"359133D0-F002-4848-9EBB-D9DF3164F052\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1472734676677,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"aU1vdmllIENhcHR1cmVz\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 37376,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"23mr\",\n \"created\" : {\n \"timestamp\" : 1472734677278,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1472734677278,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"EE20A472-B3C9-4468-B6E3-ACBEAA512177\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1474435412419,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"WW91VHViZQ==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 38400,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"27cp\",\n - \ \"created\" : {\n \"timestamp\" : 1474435891727,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1474435891727,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B83B8BA3-A11E-4755-A59B-6CF86E477F4B\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475148798833,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VHdpdHRlcg==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 39424,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"2846\",\n - \ \"created\" : {\n \"timestamp\" : 1475149557678,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475149557678,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"C3A554F5-D919-4D55-8D3B-E8D826001990\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475574935220,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SW1ndXI=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 40448,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"28fp\",\n - \ \"created\" : {\n \"timestamp\" : 1475579248623,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475579248623,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"3E6DF301-7F74-4DF2-89D7-76B08E0A0E48\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475664037939,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"QXJ0IGluIHBhcmFkaXNl\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 41472,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"28nt\",\n \"created\" : {\n \"timestamp\" : 1475664261942,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475664261942,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B78CE86F-FA41-4CCE-86A0-625B732CCDBD\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1515667950887,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"RmFjZUFwcA==\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 42496,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3w7m\",\n \"created\" - : {\n \"timestamp\" : 1515677391652,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1515677391652,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"79C63AD8-F7DF-4053-98E9-837060D6DD6D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1530527572710,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"V2hhdHNBcHA=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 43520,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"48ci\",\n \"created\" - : {\n \"timestamp\" : 1530527577021,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1530527577021,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:33 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - Transfer-Encoding: [chunked] - Via: ['xrail:nk11p00ic-ztdj02084401.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070523:7401:18RC341:Singapore'] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [659860f2-bbae-43cd-8875-02bc2df96d7b] - X-Responding-Instance: ['ckdatabasews:21004301:nk11p10me-hygg30212501:8201:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['43952'] - status: {code: 200, message: OK} -- request: - body: '{"batch": [{"resultsLimit": 1, "query": {"filterBy": {"fieldName": "indexCountID", - "fieldValue": {"type": "STRING_LIST", "value": ["CPLAssetByAssetDateWithoutHiddenOrDeleted"]}, "comparator": - "IN"}, "recordType": "HyperionIndexCountLookup"}, "zoneWide": true, "zoneID": - {"zoneName": "PrimarySync", "ownerRecordName": "_bfc6dbbcc77b03e6cebefd28a28f7e2f", - "zoneType": "REGULAR_CUSTOM_ZONE"}}]}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['278'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" - : \"CPLAssetByAssetDateWithoutHiddenOrDeleted\",\n \"recordType\" : \"IndexCountResult\",\n - \ \"fields\" : {\n \"itemCount\" : {\n \"value\" : 33161,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" - : { },\n \"recordChangeTag\" : \"0\",\n \"created\" : {\n \"timestamp\" - : 1533031233653,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"modified\" : {\n \"timestamp\" : 1533031233653,\n - \ \"userRecordName\" : \"_10\",\n \"deviceID\" : \"1\"\n },\n - \ \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : \"PrimarySync\",\n - \ \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n }\n - \ } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n - \ } ]\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 10:00:33 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - Transfer-Encoding: [chunked] - Via: ['xrail:nk11p00ic-ztdj02084101.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070523:7401:18RC341:Singapore'] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [150ef9e8-87eb-40a6-8fa3-610417a19b5b] - X-Responding-Instance: ['ckdatabasews:21001302:nk11p10me-ztbu22061701:8202:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['782'] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/vcr_cassettes/auth_requires_2fa.yml b/tests/vcr_cassettes/auth_requires_2fa.yml new file mode 100644 index 000000000..fa49803d2 --- /dev/null +++ b/tests/vcr_cassettes/auth_requires_2fa.yml @@ -0,0 +1,100 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['EC5646DE-9423-11E8-BF21-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R3_2'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234","primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"john + Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false,"firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false,"url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443","status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"},"developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/auth_requires_2sa.yml b/tests/vcr_cassettes/auth_requires_2sa.yml deleted file mode 100644 index d0bbf780f..000000000 --- a/tests/vcr_cassettes/auth_requires_2sa.yml +++ /dev/null @@ -1,37 +0,0 @@ -interactions: -- request: - body: !!python/unicode '{"apple_id": "jdoe@gmail.com", "password": "password1", - "extended_login": false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&clientId=EC5646DE-9423-11E8-BF21-14109FE0B321&ckjsVersion=2.0.5&ckjsBuildVersion=17DProjectDev77 - response: - body: {string: !!python/unicode '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"123456789","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"12341234-1234-1234-1234-143241234123","primaryEmailVerified":true,"aDsID":"12341234123412341234","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=12312412412341234123412341234123412341234#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=12312412412341234123412341234123412341234#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"TH","timeZone":"GMT+7","isAppleInternal":true},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - access-control-allow-credentials: ['true'] - access-control-allow-origin: ['https://www.icloud.com'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-originating-system: [UnknownOriginatingSystem] - apple-seq: ['0'] - apple-tk: ['false'] - cache-control: ['no-cache, no-store, private'] - connection: [keep-alive] - content-length: ['4895'] - content-type: [application/json; charset=UTF-8] - date: ['Mon, 30 Jul 2018 19:00:39 GMT'] - server: [AppleHttpServer/2f080fc0] - strict-transport-security: [max-age=31536000; includeSubDomains] - via: ['icloudedge:si03p00ic-ztde010417:7401:18RC341:Singapore'] - x-apple-jingle-correlation-key: [SJHIUN7879234KJHH8JBH] - x-apple-request-uuid: [NISUHFIOSUHFOSIDUHFOSIDF] - x-responding-instance: ['setupservice:328457238759328579234875'] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/vcr_cassettes/autodelete_photos.yml b/tests/vcr_cassettes/autodelete_photos.yml index 34ea778be..4d78004d8 100644 --- a/tests/vcr_cassettes/autodelete_photos.yml +++ b/tests/vcr_cassettes/autodelete_photos.yml @@ -1,80 +1,141 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' headers: Accept: - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '88' - Cookie: - - X-APPLE-WEBAUTH-HSA-TRUST-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw_QRDmdzLmljbG91ZC5hdXRovQAx3w1q_UxzU0vxt735DpQX3lPqPLDEcH_HydfAdJ6nSTlLv7_ACh62ZB_L7LX51z-jimLnP6rYIaVbW-sCaw0C2u9CijiBmsb40JT3EHiw4oq5X8aKuOLYMk6rxLYo7gEYMGTeRYdHwj0YFwQDWrU3xnGVbQ~~"; - X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: body: - string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"7f3b9694-5f5b-47cc-baa1-2887d1c3cb6a","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}' + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Apple-Originating-System: - - UnknownOriginatingSystem - Cache-Control: - - no-cache, no-store, private - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Tue, 31 Jul 2018 20:29:52 GMT - Server: - - AppleHttpServer/2f080fc0 + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] Set-Cookie: - - X-APPLE-WEBAUTH-PCS-Documents="TGlzdEFwcGw6MTpBcHBsOjE6AeyyUmn+DxfQYVkwS4N9KSWo9wQz3FWFkhOsYhtozsSvmSzd7PIGBI28hdy+30alZ0AUg7l+WA+D+9KhtpVipJ7GtvAoYPrx7124rxYjRftdasTAPNOrWNCHxqZy75xdc47rq77SmFwFIMnv1U7bBTNy265B0hNRUv09mpWG/d9C0J6jEQlLvg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Photos="TGlzdEFwcGw6MTpBcHBsOjE6AWQ4bYjEWsYHXMYLrWBIRmfrJwMzkLQBWuSjtiEIui2kPjTF2/B1F9q4yFFChr7jypvFPDUyu3XH5JHlsdF/a28XG7+ZepGlRTohsm3H+at7wEF1F8Tu/yBqWWZYrwCRVLwkKrOr2F7btMReNdv1TUxcRg1FP2jUG2x6/IZXyCX/Tb6nsf7nNg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Cloudkit="TGlzdEFwcGw6MTpBcHBsOjE6Ae20A/jaOB7Jp/vb0QQJstK4aC/F9i0DIRFT7bxTXJizeopWgJ+09s8DSHyTC7mOzA+YqMa/YVKiI/YOEwMRXKPd/v/e0EPvrwf+g9U2kB85GXP3ZIKMhVFfkjv5rTyKhfilxus1/OUAXx9eLXw274+0dQE7ZShJq5+CB3sK7gbWQb9AjoY+OQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Mail="TGlzdEFwcGw6MTpBcHBsOjE6AWsK+EYkcW5oCncaZt7mWIyznpVvILbzwn2hjZGRXNVYALDgK/nbNLghifgSy5O8GjUJJdkt0P3j8PKXSMzJVa55N73DAdTxKkrR6l/lcC0O8mjdQ8vV0UDrXrf9HGfK2LxPHpCWHW2PfdT8LUYe2wLnNeV14aB3tyUwziedkrUeGoIw5Pvi4w==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Notes="TGlzdEFwcGw6MTpBcHBsOjE6AWan2dQt9tfWTC5I5fQOonqhGhamG+2LlwEaBwBZkZ1c2/KLfwBNNNOex8HPCAU/6QolXDmr0RjuxoUpXOV4M44SWk7x3y5VWOGUqXZRQC73dfYWlDeL7asORptevFBP0pjKNWTEsrydCJxgOFV/3zMmP2ttB0JMmgwgp/4GGbxZFFzNHKhlwA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-News="TGlzdEFwcGw6MTpBcHBsOjE6AXWNsktajaYk/c4UbCAgakYtIfi3Qmt+vw4S7OA8RN24MSTDVchF2OwxXEEU7icP3nT9BnP5PaN/+ydABhh3fi80wSRjflsR2jvkPdErd+xI4KfAOmODK/XXlHjY1OlLwznJvwTqKtZ3xmjyuPWmc529eELcX7t9UnHiJ4UVzhDLIr+yWJQ+Ng==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-LOGIN="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp09p9iPn8FbiKxoIG_0kAMxN-rK6N-gdfoXaCL02rtN-s8LyAw~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp7MjXSx4EjN0p_L5DxpOjCsGjbXnBqj7B0nziu-AUrqRgrqURQ~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146";Path=/;Domain=.icloud.com;Secure;HttpOnly - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Apple-Jingle-Correlation-Key: - - P45ZNFC7LND4ZOVBFCD5DQ6LNI - X-Apple-Request-UUID: - - 7f3b9694-5f5b-47cc-baa1-2887d1c3cb6a - X-Responding-Instance: - - setupservice:44500303:pv37p45ic-tydg10112001:8003:1813B80:3b85e7d76 - access-control-expose-headers: - - X-Apple-Request-UUID - - Via - apple-seq: - - '0' - apple-tk: - - 'false' - content-length: - - '4872' - via: - - icloudedge:si03p00ic-ztde010303:7401:18RC341:Singapore + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] status: code: 200 message: OK @@ -98,7 +159,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -164,7 +225,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp7MjXSx4EjN0p_L5DxpOjCsGjbXnBqj7B0nziu-AUrqRgrqURQ~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -173,7 +234,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_fe308b25-76d6-4760-b583-5280f5726844\",\n @@ -252,7 +313,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp7MjXSx4EjN0p_L5DxpOjCsGjbXnBqj7B0nziu-AUrqRgrqURQ~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -261,7 +322,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_fe308b25-76d6-4760-b583-5280f5726844\",\n @@ -340,7 +401,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxsERDmdzLmljbG91ZC5hdXRovQASzAe9yIthZ-z1SRcqbQ0QIFNur7L-O_MaKbLKMJ7AGsQL-BmsThQkt5_QYLQZO1sx_XeVlKULNqHgoXD2wtFpVlPqPOQhRJ-EVRZKo7sAg9g3W-agXmOyFPOcnyDlTx7ZY-6bEIAYzbJQl9mpK8my-qugJw~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -349,7 +410,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n @@ -981,7 +1042,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxsERDmdzLmljbG91ZC5hdXRovQASzAe9yIthZ-z1SRcqbQ0QIFNur7L-O_MaKbLKMJ7AGsQL-BmsThQkt5_QYLQZO1sx_XeVlKULNqHgoXD2wtFpVlPqPOQhRJ-EVRZKo7sAgzr0VRc5N9Zz6KpDe-LFoNmooJeoxHRzbEEt9B1MKkzUNtzrfg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -990,7 +1051,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : @@ -1095,7 +1156,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxsIRDmdzLmljbG91ZC5hdXRovQATO2B4z2VTRaTCfoPT3_QUyJR1VzJExvSBuTboezA7YnFjiIFJ3Sqcz1UX-RofcueNeifnW__1FSzDEjNeYOMdLupP3QLZBpOcKy61TNd328FO3zA5jlbNVYpFvQtRSFbr296VzdaxAshS4UMerwZVbzhqTA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -1104,7 +1165,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"AR1vLgJmrHgKtD5fayMY87VlA1FA\",\n @@ -2625,7 +2686,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgx80RDmdzLmljbG91ZC5hdXRovQBF54YTWIb2BKxftLMnQO7Y9gGftd8tRhNLj7yKkHJLMXmGR46AJdITwOPMPNGWHdu6c_6XW-sSs_onY4OoLa-JSuQrEaHdqjpcd4RsHPOBPVgwovqVSIiH1-EEhAhcwR34JkNyEJAOJW-G8L3ovliS6JKpww~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~"; X_APPLE_WEB_KB-G8OEZNFVULTVFHAMBBCQAU36-EO="v=1:t=IAAAAAAABLwIAAAAAFtgw2oRDmdzLmljbG91ZC5hdXRovQAK8qeElopQo2a1fKbYKsWG24Hvq7qce169gCfJiz-GsP7L8Fl1WrsSsT1N7WWRMUw52cCU_QSqb7L5dMwVF3Vt8VROD2wpfu7c9PElWtMuAI2gnSkJxKHsK9_ydbHYzElvlY-TMOnI3MDaaVjd04Oa7zRmcQ~~" Origin: - https://www.icloud.com @@ -2634,7 +2695,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}" @@ -2704,7 +2765,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxsERDmdzLmljbG91ZC5hdXRovQASzAe9yIthZ-z1SRcqbQ0QIFNur7L-O_MaKbLKMJ7AGsQL-BmsThQkt5_QYLQZO1sx_XeVlKULNqHgoXD2wtFpVlPqPOQhRJ-EVRZKo7sAg9g3W-agXmOyFPOcnyDlTx7ZY-6bEIAYzbJQl9mpK8my-qugJw~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~" + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~" Origin: - https://www.icloud.com Referer: @@ -2712,7 +2773,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: '{"reason":"Invalid global session","error":2}' @@ -2772,7 +2833,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6ASCZ+eIlHLwatjVRxaNVwjlvf2MYzsovmXIFRP0tttrPHaOIorHKT8O9B/qCbjooOF1Pt2kzHvqTVQ0g6GKARkun3jr0PUagg92+FvCYaQbcIwiNbkuaiz81tZBPuUbhOZO8DW2mVh2zZpZAyx2Xjf7ILX6+5BFZ3/orOUZxBqML8IRtwwHJPQ=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AYHVmzu2tyRHllqyh3u29IcXm+KFVtz8uYvdhCEiN7Ytdmpv0tX49lugS1T9DR5LkPT6+1Mh9iHqA2yH7KEkjZxZqse5CaW/5pLX9ZZqR+cD8AE8sGEzCgNMQaxg4ewBKtwkXsmWwckJlGk6St28MKmHpBF+54N2quqvXRDfhrOHrIHVyDbN6A=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFtgxsERDmdzLmljbG91ZC5hdXRovQASzAe9yIthZ-z1SRcqbQ0QIFNur7L-O_MaKbLKMJ7AGsQL-BmsThQkt5_QYLQZO1sx_XeVlKULNqHgoXD2wtFpVlPqPOQhRJ-EVRZKo7sAg9g3W-agXmOyFPOcnyDlTx7ZY-6bEIAYzbJQl9mpK8my-qugJw~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~" + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFtgxr8RDmdzLmljbG91ZC5hdXRovQCQSCot1ysxaNK8eNz5c3o4pabbwMChZkAwYYnM5nzRw_cptq-efEIK3kTElDTNXo1Ou2LFreUma4rWkZArBxetxIQs1mgO43nUQ08rr-1tp30Gie0pjl83-aaa4aveSRRB_K8jekyg7n7MT2fmxzUenT-EJg~~" Origin: - https://www.icloud.com Referer: @@ -2780,7 +2841,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: '{"reason":"Invalid global session","error":2}' @@ -2818,4 +2879,401 @@ interactions: status: code: 421 message: Misdirected Request +- request: + body: '{"accountName": "jdoe@gmail.com", "password": "password1", "rememberMe": + true, "trustTokens": []}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json + Cookie: + - dslang=US-EN; site=USA; aasp=C4F8DBD63FDA6E707EC04DC8C5C54A51D10CB5E6FC501A8D548184356ABC257C11D8F15CDC21D89A3AD37A3825334221E87C81510803A846F5C836FFEFBBCC355BF706A84E83A2141E53196E055AD1CB9CB6EB294F2E2263303632EED58248B11A554C60E6DABACB0B6031513C3F19C3FF8997AD64146069 + Origin: + - https://www.icloud.com + Referer: + - https://www.icloud.com/ + User-Agent: + - Opera/9.52 (X11; Linux i686; U; en) + X-Apple-OAuth-Client-Id: + - d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d + X-Apple-OAuth-Client-Type: + - firstPartyAuth + X-Apple-OAuth-Redirect-URI: + - https://www.icloud.com + X-Apple-OAuth-Require-Grant-Code: + - 'true' + X-Apple-OAuth-Response-Mode: + - web_message + X-Apple-OAuth-Response-Type: + - code + X-Apple-OAuth-State: + - DE309E26-942E-11E8-92F5-14109FE0B321 + X-Apple-Widget-Key: + - d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d + scnt: + - AAAA-kM0RjhEQkQ2M0ZEQTZFNzA3RUMwNERDOEM1QzU0QTUxRDEwQ0I1RTZGQzUwMUE4RDU0ODE4NDM1NkFCQzI1N0MxMUQ4RjE1Q0RDMjFEODlBM0FEMzdBMzgyNTMzNDIyMUU4N0M4MTUxMDgwM0E4NDZGNUM4MzZGRkVGQkJDQzM1NUJGNzA2QTg0RTgzQTIxNDFFNTMxOTZFMDU1QUQxQ0I5Q0I2RUIyOTRGMkUyMjYzMzAzNjMyRUVENTgyNDhCMTFBNTU0QzYwRTZEQUJBQ0IwQjYwMzE1MTNDM0YxOUMzRkY4OTk3QUQ2NDE0NjA2OXwxAAABjFKqRRrj_PzP2B1vON1S9Ew5AjJ3zktIxxOaplpZfDsXTWpCDvj8cMWEfMMRABJMmY8EsJN1jNyDHQ_xhefd_7XZhOFtcytP6ykt_0EkugtwQeKH7w + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n + \n\n\n\n\n\n\n\n\n \n \n \n \n\n\n \n \n \n \n \n \n\n\n\n + \ \n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n + \ \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n + \ \n\n \n \n\n \n\n\n\n
.
\n
.
\n
\n
\n\n\n + \ \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n + \ \n\n\n\n\n\n\n\n\n \n \n \n\n \n\n\n\n\n\n\n\n\n + \ \n \n \n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n + \ \n \n \n\n\n\n \n \n \n \n\n\n\n\n\n\n\n + \ \n\n\n\n + \ \n \n \n \n\n \n \n \n \n \n \n\n\n\n" + headers: + Cache-Control: + - no-cache + - no-store + Connection: + - keep-alive + Content-Language: + - en-US-x-lvariant-USA + Content-Security-Policy: + - 'default-src ''self'' ; child-src blob: ; connect-src ''self'' https://www.apple.com + https://appleid.cdn-apple.com https://webcourier.sandbox.push.apple.com https://xp-qa.apple.com + ; font-src ''self'' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com + https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ; frame-src ''self'' https://appleid.apple.com https://gsa.apple.com ; img-src + ''self'' https://www.apple.com https://appleid.cdn-apple.com https://*.mzstatic.com + data: https://*.apple.com ; media-src data: ; object-src ''none'' ; script-src + ''self'' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com + https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ; style-src ''unsafe-inline'' ''self'' https://www.apple.com https://appleid.cdn-apple.com + https://idmsa.apple.com https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ;' + Content-Type: + - text/html;charset=UTF-8 + Date: + - Sun, 10 Dec 2023 07:24:00 GMT + Expires: + - Thu, 01 Jan 1970 00:00:00 GMT + Pragma: + - no-cache + Referrer-Policy: + - origin + Server: + - Apple + Set-Cookie: + - dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly + - site=USA; Domain=apple.com; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-Apple-I-Request-ID: + - 16c8b9a3-972d-11ee-8ab1-b5ef971e0b9e + X-Apple-I-Rscd: + - '403' + X-BuildVersion: + - R3_2 + X-Content-Type-Options: + - nosniff + X-FRAME-OPTIONS: + - DENY + X-XSS-Protection: + - 1; mode=block + content-length: + - '24161' + scnt: + - AAAA-kM0RjhEQkQ2M0ZEQTZFNzA3RUMwNERDOEM1QzU0QTUxRDEwQ0I1RTZGQzUwMUE4RDU0ODE4NDM1NkFCQzI1N0MxMUQ4RjE1Q0RDMjFEODlBM0FEMzdBMzgyNTMzNDIyMUU4N0M4MTUxMDgwM0E4NDZGNUM4MzZGRkVGQkJDQzM1NUJGNzA2QTg0RTgzQTIxNDFFNTMxOTZFMDU1QUQxQ0I5Q0I2RUIyOTRGMkUyMjYzMzAzNjMyRUVENTgyNDhCMTFBNTU0QzYwRTZEQUJBQ0IwQjYwMzE1MTNDM0YxOUMzRkY4OTk3QUQ2NDE0NjA2OXwyAAABjFKqSMN_RGPSErvxMi6_gEnrVeXLOx6Jr6A0RFmJXyosWA7jNzDyMLbc5B3gABHsCWPVPBSi2_P9A6yxDTl6Z276ywycydzP8jMn5-knEwgwSb-Q0A + vary: + - accept-encoding + status: + code: 200 + message: '' +- request: + body: '{"accountCountryCode": null, "dsWebAuthToken": null, "extended_login": + true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '94' + Origin: + - https://www.icloud.com + Referer: + - https://www.icloud.com/ + User-Agent: + - Opera/9.52 (X11; Linux i686; U; en) + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: '{"success":false,"error":"Missing apple_id field"}' + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - https://www.icloud.com + Cache-Control: + - no-cache, no-store, private + Connection: + - keep-alive + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sun, 10 Dec 2023 07:24:01 GMT + Server: + - AppleHttpServer/78689afb4479 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Apple-Edge-Response-Time: + - '13' + X-Apple-Request-UUID: + - fa36221d-aacf-49f5-872b-d31537200441 + X-Responding-Instance: + - setupservice:32600303:mr55p26ic-qukt01181701:8003:2404B363:5934c9004de5 + access-control-expose-headers: + - X-Apple-Request-UUID,Via + content-length: + - '50' + via: + - 631194250daa17e24277dea86cf30319:bfb7af22d41f64cb81a72b4edff9d9d6:usprz3 + x-apple-user-partition: + - '26' + status: + code: 400 + message: Bad Request version: 1 diff --git a/tests/vcr_cassettes/download_autodelete_photos.yml b/tests/vcr_cassettes/download_autodelete_photos.yml index d5510a0a5..492b483e2 100644 --- a/tests/vcr_cassettes/download_autodelete_photos.yml +++ b/tests/vcr_cassettes/download_autodelete_photos.yml @@ -1,79 +1,141 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' headers: Accept: - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '82' - Cookie: - - X-APPLE-DS-WEB-SESSION-TOKEN="AQGUENDC1BAMTmRBIPW5sQk8YG0eeUWAfx5DcQr7dHo2p10qyLqW93Q5eA0rJXWG74K0reOR2LTyFl+q3MNjjnwvHEvrtesrA+OUI116CcOMQaQ+lPnKy4FZEnnjkCxmOQ0zmaDLcFIuuxkaXZKwzdo4qFk9Ozj+GQZ5TB507Qb1U/p2U5BnEekjwjuzci0aOfp/NkMZoz8/Dts10woy/EmAhEsBEpLkwBoS5ow50En0yV5nkXbosR0W4ygcEtRPHTKYyrQVnJVA0c1/kziEs8vg+dsIVD+jWiC5hcnCY+tiIKmY8pFYfpV82ng4/DN4qGA/HpDQ1+vdg+HyGXzP3zJN+3HJYE82N51Dl6SGZLdQmlBbaz51nkez3OKTrN9dxT9flvlfcKHPS8hx4oGvogmFgqTJ7B4Vja7pHm8iqIDkJDx2/YoGXPWPGOzInCd3xG32Lpg4NTdoHJjMiB2MzDrcatMHR4t9vEfP8XMyOX/unYb+uhxTFvvilCnLTWvYMyw/uB7OHvj/Ljm6OWgA+UNY1teQZbxe04A1F7BwrWpZ65EurN2Srs5vfqeXBbeh1nOLuAMxh8lXJhZyVfr2oAaMn9ywC3FXxn+pW2oUVtoHHzu8mLmiLu7WV0jefq/s+bZ3V3RipIMoGb9bz8hAbmgeGCpYQ7Wjy5gDfHm8lSHvDQZPAMrnvCSAcqFdQHbd9vkHszOZ2Q0xzQRCSrg1xFU="; - X-APPLE-WEBAUTH-HSA-TRUST-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR9JSMRDmdzLmljbG91ZC5hdXRovQCOzz9XpOVw2-pKv59MN-7OXGMrm7YEsJMlv4-UMP-bt1HMCAEEfPqw-5oyPcUw5GytAuUdq8DQI3zUWQ1hiBN_6YE96OjsuHqDfzj6t-1ugVZvcPXGLlf6Z6Ar6Aa8Lov8ZEbhtKmuzO70G2QK3lJFFgnUgQ~~"; - X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: body: - string: '{"dsInfo":{"lastName":"Martin","iCDPEnabled":false,"tantorMigrated":true,"dsid":"1389775224","hsaEnabled":true,"isHideMyEmailSubscriptionActive":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"iphone","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"9b7396ed-0e97-4fb3-8c90-1163e1dc1c81","primaryEmailVerified":true,"aDsID":"002008-05-ae5f4c6f-898a-4ac2-b2c0-1cfdaddfb5de","locked":false,"ICDRSCapableDeviceCount":1,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"Steffen - Martin","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","hasUnreleasedOS":true,"analyticsOptInStatus":false,"firstName":"Steffen","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":false,"pcsDeleted":false,"isCustomDomainTransferSubscriptionActive":true,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p54-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p54-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p54-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p54-uploadphotosws.icloud.com:443","url":"https://p54-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p54-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p54-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p54-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p54-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p54-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p54-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p54-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false,"url":"https://p54-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p54-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p54-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p54-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p54-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p54-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p54-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p54-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p54-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p54-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p54-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://vandelay.icloud.com:443","status":"active"},"geows":{"url":"https://p54-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p54-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p54-contactsws.icloud.com:443","status":"active"},"developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"PST","region":"CA"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":true},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Cache-Control: - - no-cache, no-store, private - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Wed, 07 Jun 2023 02:54:13 GMT - Server: - - AppleHttpServer/3faf4ee9434b + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] Set-Cookie: - - X-APPLE-WEBAUTH-PCS-Documents="TGlzdEFwcGw6MTpBcHBsOjE6AdpUrFzoejI3weIjZZUiZ0mT18JP4PEeh8IC97qnhGXHDd33BpAm+MJs3/p7DL4V+CJIewdG4TFXlvyDHftJBNXdMBvonFzeKDHC00TUdbh1cLVKs+0Bk/yd7DmUrZj8jgmwdYGyEsQ5Hjxf887sSwDf9tpk9P4vRAx4kpGr8UdB+4vAKGUr3A==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Photos="TGlzdEFwcGw6MTpBcHBsOjE6AaRjCCJYMaphUtBBZ5TcDojlaH6T/vWjmR9f7rPtp0Bg9s7jEbeqS1A84GzwpnV3lFmF8BOg/tB3GaL/EFAQHxTikm80+veZjusviCGxnL9mbMUTkwo9FOoIeluscdDUMlt8wP+lD0oVwPTIJTbkfJw6cAXYYk5VIErUrCv17zqFWSdbvGj75w==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Cloudkit="TGlzdEFwcGw6MTpBcHBsOjE6AcgqWeCCvyKbw2ybb7b+dbC1/C2nJuDBOwP7fM4KWHjfJ4bfHagW3qoIAsRwiTZbT5rBUWxlD6Eu1D/J7xmPB8WEFuJMMRK7ufKl629LT4BEgKPEb12aLIy7OkA23qmfHVkBBB7YTB2pc7VnUPy1dX8fqj5DHs99GibT3KThPXrwlHxi5TXd7w==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Mail="TGlzdEFwcGw6MTpBcHBsOjE6AQrEh7KjB9pP6DG/B2hXg6Y80WX7Qwgie0zpmPiHZwlwnTAdH7nMrLCc1lfhLdNLY9R84b4eYl3WYoSL+3rZsiTFgv5/GzrN/flky0pXy6MTdIXegc2YIMZhpcBaYbbblAkCndJ5pixls3pcd0o6+tt3MoWWUeFfNWcrC8/65LhVjEGaW2ZFTg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Notes="TGlzdEFwcGw6MTpBcHBsOjE6Ac0hNHFRFyATLycSQHsNHyy1VTgZ1CTJ/SoEBRjM5KQZDOZs8eP8GFcv1sJco4Q3FG/w37VpA22FXvPPC4PF72q/R0/fr0Ywl9bHLGEC7J6phe+HAkXgLj2CXYeJkMp9+GvHEYPaXdI7gXFC7fS3IbR95VMG2udm5BW7vn4LBIT7YYdfXm8TPQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-News="TGlzdEFwcGw6MTpBcHBsOjE6AbyA6oj6xKvIPIuX9rM8sUg/hq9m9X3+iAW3BEAIbvf5s381AZP1lYIPWUfoPUG2ueWFUMsHHb3Ha9Vgq8D3EBWebPIQZN2H55bXptc4n40YUcM1Efw9GPHSl8igQZuJZHP5TgVInYGeQsAHAxmpZ+fMZlB9lEQjjzzy9x81QWLDgzLyUvLYJA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-UNIQUE-CLIENT-ID="Bw==";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-LOGIN="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI06xlLUlX_8EV9uFj-QpAllL8ZGepYrHIv2dweiAfDRXAK0kqEA~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI0_rx4MN8rwzyj40c7Z50QKmL5pV7ksC_2BAYwKclwD8nODPM3g~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-DS-WEB-SESSION-TOKEN="AQGjo6uRjATQg6/UJ5sNohSgAp+64iccPjvILPsronCFDhyfxVAstfhBcOOedbhfdLjO0UHbPdOH2UEdBqicEkqt9CTHCdLH8rBVRD8teoRYZGiaa7SVJfcXnaKowf0L+AfFvPbbuK5Nbh/gZZ3zb+7nMOoY2fRhbwtGSUzlCq4FBe7lB5h7im2rDBMQ5d8wvYegyP53R9ZXL6DYARj7bqhOwYBYwxs0vryyzhlzqHPp+PUzbpSAwvX9fdIQHHRwQigs7QrAWJ5Iz1G6fBp9sNER9wtYj2egl7piVRtjSxtyhgVqe/6LsZIkBg9GB6j3DoY4J2CDgv+JdqLMNsMLqNrJk+hjDNCrTFoVKOHnhsE/cZS4d8mkFYBG9ZYy9wokT7NLV3lwmJg1Oe/giy/QXFnG8fS6BLJGODpAPUgWL5/VJOoi3D04yba3FYFo32Tx/wgF0VVChlOIuzqYyRsEetGl28Drr2vqivtMCbglFR/a/pDNW5qLHcmd3PG0uBxch5Yo/okV+pi5ATZSYBKNs+EogLXQ8MEPudulmVxY1BWbOQ83RhgYyAZ/K/2i6v/8M2vJqhUzeXHdp7ChzioxdrO+DIwkXdBLW2I7DpfdAPZsUkli41+9fs1G9LcpvhinHypv1LMEgbutQrSKvK0h2VPBmcc83uu9d7R84mRvbZRuwxZeHBRIFFs7JHz2tts+8R3fFHuD/jxFE86NoLNUfwU=";Expires=Fri, - 7-Jul-2023 02:54:13 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Apple-Edge-Response-Time: - - '2093' - X-Apple-Request-UUID: - - 9b7396ed-0e97-4fb3-8c90-1163e1dc1c81 - X-Responding-Instance: - - setupservice:35000303:mr26p50ic-zteg03083001:8003:2317B443:00e2251826f5 - access-control-expose-headers: - - X-Apple-Request-UUID,Via - content-length: - - '5913' - via: - - 631194250daa17e24277dea86cf30319:cacff1bb403e842023c214177c76631d:uslax2 - x-apple-user-partition: - - '50' + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] status: code: 200 message: OK @@ -103,7 +165,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI0_rx4MN8rwzyj40c7Z50QKmL5pV7ksC_2BAYwKclwD8nODPM3g~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -112,7 +174,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_911a39bc-1c9a-4dcd-88be-6673de6d7b6e\",\n @@ -189,7 +251,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI0_rx4MN8rwzyj40c7Z50QKmL5pV7ksC_2BAYwKclwD8nODPM3g~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -198,7 +260,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_911a39bc-1c9a-4dcd-88be-6673de6d7b6e\",\n @@ -269,7 +331,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -336,7 +398,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadFHi5h-UIXCNDY8-84M7nKsc5iO-PMkKOWmYD-Hr-zcNQHAiRg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -345,7 +407,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"----Project-Root-Folder----\",\n @@ -635,7 +697,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadETSJBNyocS1GNe1I_4GMYz9eFOmEcmpyuqbjhSopkbj2wL7ug~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -644,7 +706,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : @@ -749,7 +811,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadNlh_zBR9jBtZXqXtqG_WeBKYMtG3YE7yXWxNz2iLK8aiqN_yQ~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -758,7 +820,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"AeYfMtlOMb3dM9bETic9fXkMpjMV\",\n @@ -10330,7 +10392,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadP1ypEOnDlMqYC5wFWuZu3xJC43oc3vxKHLQSJEgmHAVUeSy7g~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -10339,7 +10401,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"A5A7C0F1-BE37-46D8-9A99-400AD6DC2351\",\n @@ -10391,80 +10453,96 @@ interactions: code: 200 message: OK - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: 'null' headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '82' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['4'] Cookie: - - X-APPLE-DS-WEB-SESSION-TOKEN="AQGjo6uRjATQg6/UJ5sNohSgAp+64iccPjvILPsronCFDhyfxVAstfhBcOOedbhfdLjO0UHbPdOH2UEdBqicEkqt9CTHCdLH8rBVRD8teoRYZGiaa7SVJfcXnaKowf0L+AfFvPbbuK5Nbh/gZZ3zb+7nMOoY2fRhbwtGSUzlCq4FBe7lB5h7im2rDBMQ5d8wvYegyP53R9ZXL6DYARj7bqhOwYBYwxs0vryyzhlzqHPp+PUzbpSAwvX9fdIQHHRwQigs7QrAWJ5Iz1G6fBp9sNER9wtYj2egl7piVRtjSxtyhgVqe/6LsZIkBg9GB6j3DoY4J2CDgv+JdqLMNsMLqNrJk+hjDNCrTFoVKOHnhsE/cZS4d8mkFYBG9ZYy9wokT7NLV3lwmJg1Oe/giy/QXFnG8fS6BLJGODpAPUgWL5/VJOoi3D04yba3FYFo32Tx/wgF0VVChlOIuzqYyRsEetGl28Drr2vqivtMCbglFR/a/pDNW5qLHcmd3PG0uBxch5Yo/okV+pi5ATZSYBKNs+EogLXQ8MEPudulmVxY1BWbOQ83RhgYyAZ/K/2i6v/8M2vJqhUzeXHdp7ChzioxdrO+DIwkXdBLW2I7DpfdAPZsUkli41+9fs1G9LcpvhinHypv1LMEgbutQrSKvK0h2VPBmcc83uu9d7R84mRvbZRuwxZeHBRIFFs7JHz2tts+8R3fFHuD/jxFE86NoLNUfwU="; - X-APPLE-WEBAUTH-HSA-TRUST-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR9JSMRDmdzLmljbG91ZC5hdXRovQCOzz9XpOVw2-pKv59MN-7OXGMrm7YEsJMlv4-UMP-bt1HMCAEEfPqw-5oyPcUw5GytAuUdq8DQI3zUWQ1hiBN_6YE96OjsuHqDfzj6t-1ugVZvcPXGLlf6Z6Ar6Aa8Lov8ZEbhtKmuzO70G2QK3lJFFgnUgQ~~"; - X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) + - X-APPLE-UNIQUE-CLIENT-ID="EQ=="; X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901"; X_APPLE_WEB_KB-A0OXAM_WG97BH5FBDJFP8-DKXTW="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890="; + X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-HSA-TRUST-A0OXAM_WG97BH5FBDJFP8-DKXTW="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890="; + X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890="; + X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890="; + X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890="; + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/validate response: body: - string: '{"dsInfo":{"lastName":"Martin","iCDPEnabled":false,"tantorMigrated":true,"dsid":"1389775224","hsaEnabled":true,"isHideMyEmailSubscriptionActive":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"iphone","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"17c47c85-604f-4f3f-8903-c87bfc50b842","primaryEmailVerified":true,"aDsID":"002008-05-ae5f4c6f-898a-4ac2-b2c0-1cfdaddfb5de","locked":false,"ICDRSCapableDeviceCount":1,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"Steffen - Martin","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","hasUnreleasedOS":true,"analyticsOptInStatus":false,"firstName":"Steffen","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":false,"pcsDeleted":false,"isCustomDomainTransferSubscriptionActive":true,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p54-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p54-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p54-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p54-uploadphotosws.icloud.com:443","url":"https://p54-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p54-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p54-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p54-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p54-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p54-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p54-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p54-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false,"url":"https://p54-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p54-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p54-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p54-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p54-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p54-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p54-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p54-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p54-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p54-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p54-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://vandelay.icloud.com:443","status":"active"},"geows":{"url":"https://p54-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p54-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p54-contactsws.icloud.com:443","status":"active"},"developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"PST","region":"CA"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":true},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Cache-Control: - - no-cache, no-store, private - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Wed, 07 Jun 2023 02:54:21 GMT - Server: - - AppleHttpServer/3faf4ee9434b + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] Set-Cookie: - - X-APPLE-WEBAUTH-PCS-Documents="TGlzdEFwcGw6MTpBcHBsOjE6AfsWyTKnuRhTpM+cTiVTi9SebcNMf4q8Jh1XcmfBG7FY4irBJ+ZzqQscix4svHjvuxL3dFAXYhfcudQM5cpqgk/XxgQZmftuNhspRDX/NYFbYG+uGnArPj+B7HUK0jf6vGvqtb6+mtNTReCFaM/9PkBAU3ihA/aLmxUd18SpTncgRWBqM3mkeg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Photos="TGlzdEFwcGw6MTpBcHBsOjE6ARMmldyvsSrL3ZpgAMmLB0hfxS7V02AGHqtRo9vcEn3VRp0aw5rQHf2M5eKTmphmivOPpukfjWMR6nob3cxU2RpBzmBdJU1hQ5hWvG0QqSqwOXWyZMtBVveNkOEblx45lCT0NbPX8x5EQ2gbkQFlXjKkZ7CNgjNCaCT5KWw2rGXmyiM8rmUpOQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Cloudkit="TGlzdEFwcGw6MTpBcHBsOjE6ATWyWOTRvrJx9mZ8+z7kJgUdGp/0WF7WpdshiISotWG8zDX7k22oI4htdxAiR3GCSYkLL3/dZ5qIXsr43zAG8zokuxTkOITAxZ/PHRNuPfv3sBCl418QGGV3YSQVczuXvZEhwOC2KG5dcf4jZ+//e9q/hLg6j86sZFyw3bOVr119LE+FVTTGuw==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Mail="TGlzdEFwcGw6MTpBcHBsOjE6AfOA1hX+SEaUYay75lglh+JAO0E/2YecfD3O6S4baOaYZJUENL71Wm/BD/UBiwliDA/oEKAeUYWCAmfLX/5gI58KLAOobLc0mgu59n5WudlRooK0No7Wq9g+A6HUMsBANdfuOlDZowUyUTu8pLamKuwhEIYnOUYjjO7XAa9wEAAkEPvSlJMU+A==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Notes="TGlzdEFwcGw6MTpBcHBsOjE6ATZZqwnOE0EnicwdFaXsUQnHQjZLCeCNwBnDBd2MHw97AEAF/tt73SJmOhJH1LSWOcHvDNDnhsJ9BaJOUCzJUVo8YJr4KWBL/bHHQdaBU+gtPqn4pYsWNA1iv5z9mDtNBGOof3MzW9PSE0djxOeujWcgr8f7FMbZvnbbqjmAzkBcqtfeVWRqgg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-News="TGlzdEFwcGw6MTpBcHBsOjE6AWQ/uJv7XGKreF+vfj46UG6l6Ra63OA29YWRSE9HeWqZ1+NXe4GjtdbvPHCGUrilrCXrzEowQBHK8TJaIfgBu7P17LTk6wBWnLA2kXlLQNBMf2ts0Wo9REpfKSiSofJ77mZr47YUkCxpt/wLFpDmdjazgR9UBgdliWUOr4W3bunlrZbhjXH2/g==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-UNIQUE-CLIENT-ID="Bw==";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-LOGIN="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjpyHpjDmrbnqjK8-1RSVu_HpVFeAbNwiTOnehxuw5MJOhN59mg~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjmRzu3suQForfWBKsxnaZgLJwtIPeBDQ61uFD9R0TIpyk-EAuA~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-DS-WEB-SESSION-TOKEN="AQHDU5XLib68GU3ldbG8moSiPgnpFbUKVAmbJl+GJchIwqDTBk+bXjGRTGUyCovYdBKh6awjp3oVC+DTM85eVv1Rt+a2P+05gHsJnaKiSM750TqA7kwq9kWyT7ljnvABM7wKODXXVF18ml37NHd/GL8/Bj2EUrkFQIEANrvj4j4AJzYT+fhCMmLH2JtTk/0y8liedvPzZCAZV+Nsj57ePBK3R+JWRAiTMVMZrSfd+428eU/j9h80YdiYXj6kVP1Zn+ci13PLj5aWW2coE100ug8Ytw296KANKDy9WqJpXd26rYxNwts+LNtwtoyqWOIUV9WkMiTFwfgQBenlgtHM4W8ffASTtC8cA62r3jiww+so10UTGbtAyYKFEP83ha1CSmdYkO5w9fEi3sYcdXAjz432aCs39g7ZPOMP5azjF6PQEOf2p/HTpxDMx1yFa7FVhYp9NY1UOXYWSJXTHR8fUv8ZnWThZRLUeX2cACALiZh5VjZKUFXc78B0R5oLdrqQmB9jLfLhtF+F0g5q5dbIFJccn++iFlN1xbt5BgIqS4qgWJpP77sSoXUJ+GMaHhlKDkF0e2QYN3dV2OhHg9kiphvu/OEasUHe4bXvA+fasxy89oZD0leM/lWuQvmfxjgFIsrVM+eSIBmerltvdq97KAD2QRxv2NIrtp6k5CuI/JIjL9+62h6KD0GJgijkGH/LgFRgVBuTg/FrCZzDFi8Q/DQ=";Expires=Fri, - 7-Jul-2023 02:54:20 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Apple-Edge-Response-Time: - - '2293' - X-Apple-Request-UUID: - - 17c47c85-604f-4f3f-8903-c87bfc50b842 - X-Responding-Instance: - - setupservice:37200401:mr36p72ic-qugg05023201:8001:2317B443:00e2251826f5 - access-control-expose-headers: - - X-Apple-Request-UUID,Via - content-length: - - '5913' - via: - - 631194250daa17e24277dea86cf30319:94c714644107ee8814feb5b716a66dff:uslax2 - x-apple-user-partition: - - '72' + - 'X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~~";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] status: code: 200 message: OK @@ -10488,7 +10566,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -10555,7 +10633,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjmRzu3suQForfWBKsxnaZgLJwtIPeBDQ61uFD9R0TIpyk-EAuA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -10564,7 +10642,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_82b4e8ce-766a-4f0d-acfd-2d93166d9ae6\",\n @@ -10643,7 +10721,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjmRzu3suQForfWBKsxnaZgLJwtIPeBDQ61uFD9R0TIpyk-EAuA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -10652,7 +10730,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_82b4e8ce-766a-4f0d-acfd-2d93166d9ae6\",\n @@ -10731,7 +10809,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8V0RDmdzLmljbG91ZC5hdXRovQABixnV9SSab1hkXueUTJtIEBd0bW1kHTby2yieKoCwFVV5Pumb5hlZGtWzXvlTwKFKlTiZLqRzk82sSf9gFYhVPlSQNvXl8J2VAZJQ9DOb1ya5RdJ-DxcDd2JOELG1xRZPPShkRB3ZZU3haFdyH3VZcuUd2w~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -10740,7 +10818,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"----Project-Root-Folder----\",\n @@ -11030,7 +11108,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8V0RDmdzLmljbG91ZC5hdXRovQABixnV9SSab1hkXueUTJtIEBd0bW1kHTby2yieKoCwFVV5Pumb5hlZGtWzXvlTwKFKlTiZLqRzk82sSf9gFYhVPlSQNvXl8J2VAZJQ9DOb12w1Y_3poXXera3y5Lb6IN7ysM3aaQWIYIB9VFEnxznqK6ZPhA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -11039,7 +11117,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : @@ -11144,7 +11222,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8V0RDmdzLmljbG91ZC5hdXRovQABixnV9SSab1hkXueUTJtIEBd0bW1kHTby2yieKoCwFVV5Pumb5hlZGtWzXvlTwKFKlTiZLqRzk82sSf9gFYhVPlSQNvXl8J2VAZJQ9DOb19A8Cbm3EXw9uTdYYKCfWbOP5ueGtBhKR3yEUTh2mB7naALGeg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -11153,7 +11231,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"AeYfMtlOMb3dM9bETic9fXkMpjMV\",\n @@ -18279,7 +18357,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AdGT86Dlzj1PMgBBUx7lc+K63GIufkP/UwPcDlzOGcD4w4tS7XfxYahGGGg1BbUyfsxEeUZXMDInlol6H9GnM9lT5Qs8rztMJ4+gBAvgzfSvD04Jhrb/XMLN1IsSBx/i5Nx61lkJ3FQdLPt6pufKcoRVbodOCnwFWSA8U273ikSb+dswGbyxTA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6ASHqruS3RSbwhvI1ykI0lkifaJA1GzNyxrJtJY//DKCoDfWVPkwaUdmQ04zSYEYTAbzcrj/nMLihas0nl+RfVKyE3542R0my728BWi859j3WCRJ/hGq8r5mB/Xq62eck7KRY1+VslSZ7SZn5H2jPVpO+aeofhPSwTHV8GCjyPB707Du4U7cBPQ=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8V0RDmdzLmljbG91ZC5hdXRovQABixnV9SSab1hkXueUTJtIEBd0bW1kHTby2yieKoCwFVV5Pumb5hlZGtWzXvlTwKFKlTiZLqRzk82sSf9gFYhVPlSQNvXl8J2VAZJQ9DOb1_6DZGCPI5onyvuceddsTmN5l7IPNTQnDdjT97H5YmdHD_QinA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VsRDmdzLmljbG91ZC5hdXRovQB6pNymennFg2dbQ2ejmOWoaGTIKqEkQ_GsqLDzkGnjW6wf76mZaBFR-ksu3nTPlv64XrC0jJKShZfTXXkcWF_N6b70oGt2qdIzRtY6dVjcjnGNC3HrU0-aSt9SEzaVmn_loCjDCvkqLoRtJK7R0ETSoaQh_g~~"; X_APPLE_WEB_KB-4WGKUPJCW9TNUKCLBDOXGDNDMWK="v=1:t=Bg==BST_IAAAAAAABLwIAAAAAGR9JAwRDmdzLmljbG91ZC5hdXRovQChjrt-l9JHU7mS5LDcR_rfVsyjzgwn7Bqg-jUgpppgZxPPtg1N665XoDLrzq9aWRgxn99NKveyhdGeUHtYLXLQxZtI2XcMy6l0tOucKCR7e7PH9Y2CtIQMK-hd1XaLr5HD8BmtzfPKQEBj6nOIhT_wnu4tCA~~" Origin: - https://www.icloud.com @@ -18288,7 +18366,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=1389775224&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ ],\n \"syncToken\" : \"AQAAAAAAAURhf/////////+LxHA1AvhAx66JMCtmgB8J\"\n}" @@ -18354,7 +18432,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadFHi5h-UIXCNDY8-84M7nKsc5iO-PMkKOWmYD-Hr-zcNQHAiRg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~" + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~" Origin: - https://www.icloud.com Referer: @@ -18362,7 +18440,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: '{"reason":"Invalid global session","error":2}' @@ -18422,7 +18500,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AYycf2dtGqg2HPtZcGDzGtYM9FqsihFV6nllf55BSu6GrLY9WnmxKgH8+lq+G+LZJ36g5iLuvhEZ7djqSYARdCcaz81YDeR9W6RGq0FjqtaErgQ0v8pWvNZbem174GzmAE+1sdiPsPlyOa4Yo2nsfhKPSDk8vY+leJcBi9AEgPB6qesGnFolAA=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AePC0QBcgT268muedsIe8VX8gKrN8HH0dml1PmbKGGh0jF9foFWnZH8pEbqVBlb7WMDIVHIX4+telZ21dkDteyMQ/KdYaYP/dM36DrucVi18c8p08LGSWdyghzE7fj9QuaJgq4/F+C3fhEwrkIO3o0U99rERbNZGmXFySDT9W5ZowRlDNKnplA=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VYRDmdzLmljbG91ZC5hdXRovQDJyoT-b1YRarSOq9akhwi1jLCBzsdKxalcy0jn0LFE-Yh9Ds6uCupgCwoJVqjila6No3Ot2H4pHCa7gtRvDvDJSGBSEkHSUuLayc0iPphadFHi5h-UIXCNDY8-84M7nKsc5iO-PMkKOWmYD-Hr-zcNQHAiRg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=1389775224"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~" + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Bw==BST_IAAAAAAABLwIAAAAAGR_8VQRDmdzLmljbG91ZC5hdXRovQB_ABV6RApEPq82ByPdBFIT2DmZ3sFC8ggKtIdGh2jMImZb46kfIUX2uc_ROD-Q9zRcTu3CaDypDuWgeUg3MY3ItAW2jBNKGu0WZxzaDoJI08OqNC8TRuhzLlNWoo_Zlz7N2GqkHUqbWatD93Zn9IP3jmZdcw~~" Origin: - https://www.icloud.com Referer: @@ -18430,7 +18508,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p54-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: '{"reason":"Invalid global session","error":2}' @@ -18468,4 +18546,399 @@ interactions: status: code: 421 message: Misdirected Request +- request: + body: '{"accountName": "jdoe@gmail.com", "password": "password1", "rememberMe": + true, "trustTokens": []}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json + Origin: + - https://www.icloud.com + Referer: + - https://www.icloud.com/ + User-Agent: + - Opera/9.52 (X11; Linux i686; U; en) + X-Apple-OAuth-Client-Id: + - d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d + X-Apple-OAuth-Client-Type: + - firstPartyAuth + X-Apple-OAuth-Redirect-URI: + - https://www.icloud.com + X-Apple-OAuth-Require-Grant-Code: + - 'true' + X-Apple-OAuth-Response-Mode: + - web_message + X-Apple-OAuth-Response-Type: + - code + X-Apple-OAuth-State: + - DE309E26-942E-11E8-92F5-14109FE0B321 + X-Apple-Widget-Key: + - d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n + \n\n\n\n\n\n\n\n\n \n \n \n \n\n\n \n \n \n \n \n \n\n\n\n + \ \n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n + \ \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n + \ \n\n \n \n\n \n\n\n\n
.
\n
.
\n
\n
\n\n\n + \ \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n + \ \n\n\n\n\n\n\n\n\n \n \n \n\n \n\n\n\n\n\n\n\n\n + \ \n \n \n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n + \ \n \n \n\n\n\n \n \n \n \n\n\n\n\n\n\n\n + \ \n\n\n\n + \ \n \n \n \n\n \n \n \n \n \n \n\n\n\n" + headers: + Cache-Control: + - no-cache + - no-store + Connection: + - keep-alive + Content-Language: + - en-US-x-lvariant-USA + Content-Security-Policy: + - 'default-src ''self'' ; child-src blob: ; connect-src ''self'' https://www.apple.com + https://appleid.cdn-apple.com https://webcourier.sandbox.push.apple.com https://xp-qa.apple.com + ; font-src ''self'' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com + https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ; frame-src ''self'' https://appleid.apple.com https://gsa.apple.com ; img-src + ''self'' https://www.apple.com https://appleid.cdn-apple.com https://*.mzstatic.com + data: https://*.apple.com ; media-src data: ; object-src ''none'' ; script-src + ''self'' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com + https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ; style-src ''unsafe-inline'' ''self'' https://www.apple.com https://appleid.cdn-apple.com + https://idmsa.apple.com https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com + ;' + Content-Type: + - text/html;charset=UTF-8 + Date: + - Sun, 10 Dec 2023 07:23:59 GMT + Expires: + - Thu, 01 Jan 1970 00:00:00 GMT + Pragma: + - no-cache + Referrer-Policy: + - origin + Server: + - Apple + Set-Cookie: + - dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly + - site=USA; Domain=apple.com; Path=/; Secure; HttpOnly + - aasp=C4F8DBD63FDA6E707EC04DC8C5C54A51D10CB5E6FC501A8D548184356ABC257C11D8F15CDC21D89A3AD37A3825334221E87C81510803A846F5C836FFEFBBCC355BF706A84E83A2141E53196E055AD1CB9CB6EB294F2E2263303632EED58248B11A554C60E6DABACB0B6031513C3F19C3FF8997AD64146069; + Domain=idmsa.apple.com; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-Apple-I-Request-ID: + - 163b4691-972d-11ee-a894-1573f1c74108 + X-Apple-I-Rscd: + - '403' + X-BuildVersion: + - R3_2 + X-Content-Type-Options: + - nosniff + X-FRAME-OPTIONS: + - DENY + X-XSS-Protection: + - 1; mode=block + content-length: + - '23705' + scnt: + - AAAA-kM0RjhEQkQ2M0ZEQTZFNzA3RUMwNERDOEM1QzU0QTUxRDEwQ0I1RTZGQzUwMUE4RDU0ODE4NDM1NkFCQzI1N0MxMUQ4RjE1Q0RDMjFEODlBM0FEMzdBMzgyNTMzNDIyMUU4N0M4MTUxMDgwM0E4NDZGNUM4MzZGRkVGQkJDQzM1NUJGNzA2QTg0RTgzQTIxNDFFNTMxOTZFMDU1QUQxQ0I5Q0I2RUIyOTRGMkUyMjYzMzAzNjMyRUVENTgyNDhCMTFBNTU0QzYwRTZEQUJBQ0IwQjYwMzE1MTNDM0YxOUMzRkY4OTk3QUQ2NDE0NjA2OXwxAAABjFKqRRrj_PzP2B1vON1S9Ew5AjJ3zktIxxOaplpZfDsXTWpCDvj8cMWEfMMRABJMmY8EsJN1jNyDHQ_xhefd_7XZhOFtcytP6ykt_0EkugtwQeKH7w + vary: + - accept-encoding + status: + code: 200 + message: '' +- request: + body: '{"accountCountryCode": null, "dsWebAuthToken": null, "extended_login": + true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '94' + Origin: + - https://www.icloud.com + Referer: + - https://www.icloud.com/ + User-Agent: + - Opera/9.52 (X11; Linux i686; U; en) + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: '{"success":false,"error":"Missing apple_id field"}' + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - https://www.icloud.com + Cache-Control: + - no-cache, no-store, private + Connection: + - keep-alive + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sun, 10 Dec 2023 07:24:00 GMT + Server: + - AppleHttpServer/78689afb4479 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Apple-Edge-Response-Time: + - '13' + X-Apple-Request-UUID: + - 00c939b1-12ef-4e68-b38b-9a13c0239052 + X-Responding-Instance: + - setupservice:35000101:mr26p50ic-zteg03072401:8001:2404B363:5934c9004de5 + access-control-expose-headers: + - X-Apple-Request-UUID,Via + content-length: + - '50' + via: + - 631194250daa17e24277dea86cf30319:2661a606d824d4e3875039f2a312d349:usprz3 + x-apple-user-partition: + - '50' + status: + code: 400 + message: Bad Request version: 1 diff --git a/tests/vcr_cassettes/download_live_photos.yml b/tests/vcr_cassettes/download_live_photos.yml index 096844d21..35be71236 100644 --- a/tests/vcr_cassettes/download_live_photos.yml +++ b/tests/vcr_cassettes/download_live_photos.yml @@ -1,148 +1,141 @@ interactions: - request: - body: '{"apple_id": "john@doe.co", "password": "password123", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' headers: Accept: - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '87' - Cookie: - - X-APPLE-WEBAUTH-HSA-TRUST-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD4IRDmdzLmljbG91ZC5hdXRovQBe_HEqqF9aBTyDIH0aFHqxCTMdUrkC9gwBg9DUkDjruh1ynwgTAOmhoVF-jD1ijGUNqJMAksawXsEIo0UgKGnSlSrUik_fhMxUp48CZtS7Lu4XlW0vEFteX1XcPWPWV9bbeatJhMQ4iH0y59tt_htYCnHdIg~~"; - X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: body: - string: "{\"dsInfo\":{\"lastName\":\"Doe\",\"iCDPEnabled\":false,\"tantorMigrated\"\ - :true,\"dsid\":\"220791670\",\"hsaEnabled\":true,\"ironcadeMigrated\":true,\"\ - locale\":\"de-de_DE\",\"brZoneConsolidated\":false,\"isManagedAppleID\":false,\"\ - gilligan-invited\":\"true\",\"appleIdAliases\":[\"john@doe.co\",\"\ - john@doe.co\"],\"hsaVersion\":2,\"isPaidDeveloper\":false,\"countryCode\"\ - :\"DEU\",\"notificationId\":\"48304f2e-28fc-45bd-9724-6db51b2abe37\",\"primaryEmailVerified\"\ - :true,\"aDsID\":\"000639-05-90e49afe-d7fc-48fd-85a1-af16160afd6a\",\"locked\"\ - :false,\"hasICloudQualifyingDevice\":true,\"primaryEmail\":\"john@doe.co\"\ - ,\"appleIdEntries\":[{\"isPrimary\":true,\"type\":\"EMAIL\",\"value\":\"john@doe.co\"\ - },{\"type\":\"EMAIL\",\"value\":\"john@doe.co\"},{\"type\":\"EMAIL\"\ - ,\"value\":\"john@doe.co\"}],\"gilligan-enabled\":\"true\",\"fullName\"\ - :\"John Doe\",\"languageCode\":\"de-de\",\"appleId\":\"john@doe.co\"\ - ,\"firstName\":\"John\",\"iCloudAppleIdAlias\":\"john@doe.co\"\ - ,\"notesMigrated\":true,\"hasPaymentInfo\":false,\"pcsDeleted\":false,\"appleIdAlias\"\ - :\"john@doe.co\",\"brMigrated\":true,\"statusCode\":2,\"familyEligible\"\ - :true},\"hasMinimumDeviceForPhotosWeb\":true,\"iCDPEnabled\":false,\"webservices\"\ - :{\"reminders\":{\"url\":\"https://p42-remindersws.icloud.com:443\",\"status\"\ - :\"active\"},\"notes\":{\"url\":\"https://p43-notesws.icloud.com:443\",\"\ - status\":\"active\"},\"mail\":{\"url\":\"https://p43-mailws.icloud.com:443\"\ - ,\"status\":\"active\"},\"ckdatabasews\":{\"pcsRequired\":true,\"url\":\"\ - https://p53-ckdatabasews.icloud.com:443\",\"status\":\"active\"},\"photosupload\"\ - :{\"pcsRequired\":true,\"url\":\"https://p53-uploadphotosws.icloud.com:443\"\ - ,\"status\":\"active\"},\"photos\":{\"pcsRequired\":true,\"uploadUrl\":\"\ - https://p53-uploadphotosws.icloud.com:443\",\"url\":\"https://p53-photosws.icloud.com:443\"\ - ,\"status\":\"active\"},\"drivews\":{\"pcsRequired\":true,\"url\":\"https://p53-drivews.icloud.com:443\"\ - ,\"status\":\"active\"},\"uploadimagews\":{\"url\":\"https://p53-uploadimagews.icloud.com:443\"\ - ,\"status\":\"active\"},\"schoolwork\":{},\"cksharews\":{\"url\":\"https://p53-ckshare.icloud.com:443\"\ - ,\"status\":\"active\"},\"findme\":{\"url\":\"https://p42-fmipweb.icloud.com:443\"\ - ,\"status\":\"active\"},\"ckdeviceservice\":{\"url\":\"https://p53-ckdevice.icloud.com:443\"\ - },\"iworkthumbnailws\":{\"url\":\"https://p53-iworkthumbnailws.icloud.com:443\"\ - ,\"status\":\"active\"},\"calendar\":{\"url\":\"https://p42-calendarws.icloud.com:443\"\ - ,\"status\":\"active\"},\"docws\":{\"pcsRequired\":true,\"url\":\"https://p53-docws.icloud.com:443\"\ - ,\"status\":\"active\"},\"settings\":{\"url\":\"https://p42-settingsws.icloud.com:443\"\ - ,\"status\":\"active\"},\"ubiquity\":{\"url\":\"https://p42-ubiquityws.icloud.com:443\"\ - ,\"status\":\"active\"},\"streams\":{\"url\":\"https://p42-streams.icloud.com:443\"\ - ,\"status\":\"active\"},\"keyvalue\":{\"url\":\"https://p53-keyvalueservice.icloud.com:443\"\ - ,\"status\":\"active\"},\"archivews\":{\"url\":\"https://p42-archivews.icloud.com:443\"\ - ,\"status\":\"active\"},\"push\":{\"url\":\"https://p42-pushws.icloud.com:443\"\ - ,\"status\":\"active\"},\"iwmb\":{\"url\":\"https://p53-iwmb.icloud.com:443\"\ - ,\"status\":\"active\"},\"iworkexportws\":{\"url\":\"https://p53-iworkexportws.icloud.com:443\"\ - ,\"status\":\"active\"},\"geows\":{\"url\":\"https://p53-geows.icloud.com:443\"\ - ,\"status\":\"active\"},\"account\":{\"iCloudEnv\":{\"shortId\":\"p\",\"vipSuffix\"\ - :\"prod\"},\"url\":\"https://p42-setup.icloud.com:443\",\"status\":\"active\"\ - },\"fmf\":{\"url\":\"https://p42-fmfweb.icloud.com:443\",\"status\":\"active\"\ - },\"contacts\":{\"url\":\"https://p53-contactsws.icloud.com:443\",\"status\"\ - :\"active\"}},\"pcsEnabled\":true,\"configBag\":{\"urls\":{\"accountCreateUI\"\ - :\"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create\"\ - ,\"accountLoginUI\":\"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d\"\ - ,\"accountLogin\":\"https://setup.icloud.com/setup/ws/1/accountLogin\",\"\ - accountRepairUI\":\"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair\"\ - ,\"downloadICloudTerms\":\"https://setup.icloud.com/setup/ws/1/downloadLiteTerms\"\ - ,\"repairDone\":\"https://setup.icloud.com/setup/ws/1/repairDone\",\"accountAuthorizeUI\"\ - :\"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d\"\ - ,\"vettingUrlForEmail\":\"https://id.apple.com/IDMSEmailVetting/vetShareEmail\"\ - ,\"accountCreate\":\"https://setup.icloud.com/setup/ws/1/createLiteAccount\"\ - ,\"getICloudTerms\":\"https://setup.icloud.com/setup/ws/1/getTerms\",\"vettingUrlForPhone\"\ - :\"https://id.apple.com/IDMSEmailVetting/vetSharePhone\"},\"accountCreateEnabled\"\ - :\"true\"},\"hsaTrustedBrowser\":true,\"appsOrder\":[\"mail\",\"contacts\"\ - ,\"calendar\",\"photos\",\"iclouddrive\",\"notes3\",\"reminders\",\"pages\"\ - ,\"numbers\",\"keynote\",\"newspublisher\",\"fmf\",\"find\",\"settings\"],\"\ - version\":2,\"isExtendedLogin\":false,\"pcsServiceIdentitiesIncluded\":true,\"\ - hsaChallengeRequired\":false,\"requestInfo\":{\"country\":\"DE\",\"timeZone\"\ - :\"GMT+1\",\"region\":\"HE\"},\"pcsDeleted\":false,\"iCloudInfo\":{\"SafariBookmarksHasMigratedToCloudKit\"\ - :true},\"apps\":{\"calendar\":{},\"reminders\":{},\"keynote\":{\"isQualifiedForBeta\"\ - :true},\"settings\":{\"canLaunchWithOneFactor\":true},\"mail\":{},\"numbers\"\ - :{\"isQualifiedForBeta\":true},\"photos\":{},\"pages\":{\"isQualifiedForBeta\"\ - :true},\"notes3\":{},\"find\":{\"canLaunchWithOneFactor\":true},\"iclouddrive\"\ - :{},\"newspublisher\":{\"isHidden\":true},\"fmf\":{},\"contacts\":{}}}" + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Apple-Originating-System: - - UnknownOriginatingSystem - Cache-Control: - - no-cache, no-store, private - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Wed, 04 Nov 2020 20:37:33 GMT - Server: - - AppleHttpServer/4b0f4e40276cabbbae998f715d1fd1336e7478a2 + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] Set-Cookie: - - X-APPLE-WEBAUTH-PCS-Documents="TGlzdEFwcGw6MTpBcHBsOjE6AaRtIEBA1ay7/14ySSB8sAYXgCOhBADAuXNaXtDRbR70NDvdVi+y9FsG9NPkLucycUPuoEPpr6Ex2QnPnb3PTlo2dDFYblkeKiy/AlUIGB7RxqPGnJwXEbYSiKbgSgyPyRSy6EhT42RP7SLSL9v9a9EGajObAqSAIvm8HZCPhu4LVY/zN1Z2Sg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Photos="TGlzdEFwcGw6MTpBcHBsOjE6ATJMMkRd7zBa4dSCbhjHzt4QvnkIebBOtxRryt88xD2NNeECRzlatqMujMVrzyvnlMDkR8Hzi/nm9urfKyro7tvYrAmPYztaVz73skcoONGGDDMv3L4eJTvm1pCixYlWFE/lIy3ad123AWp6YfOMRh538Bn+iiH24jS7/yS87ml2su3Z6Oi2+Q==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Cloudkit="TGlzdEFwcGw6MTpBcHBsOjE6AT6lHFhg8uBjq0PfNfh36ZqTYmQrpzlZ5CX/e21xWqq+YzeAE1Is225rFkZzMYxlP7K4hNu0Ilu6Q0lXAe/Z3lFrlAQgMP+80skHdzHVcHCX0oSVXocPcBIc83Yvy52xBQKhLPVzqw146xIpwCuqOp1dmvF8eIFLSAmMYaLmp4L1DM3sePHsnA==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Mail="TGlzdEFwcGw6MTpBcHBsOjE6AUXr2IhmTc/YULiaouc6sdG6QAV6WhXZGHLPwwzEXceZ7Ks2hIjHcersM+vAUT5Wj1NQ45gymb2LG8XLYSLZBk7B3CT5y95gcOiAKvDR3P4OJgWgXsKj4eGJM39Y/OrWQ5314SiMKrU5oC6AiVqScj7UKGfkgOug06bCGJgoeOHnRbT7fKzsKw==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Notes="TGlzdEFwcGw6MTpBcHBsOjE6Ade1J+1k01DxMNYGRbnq/YlxZ8LHfzpgTwlbsBoBEr6CnaamswdGbiotfaL7ofWUxgFTmVVMpKsZuqhYXbiN9ZKV9miktLjacY8OYLkK9oY4JXiGzygROKmbVhe19i4ZxRAuOqjW9Sqc7I3uOhB3wrUta+vAVGppnqKHEZTIJfHTK+J6yWud3Q==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-News="TGlzdEFwcGw6MTpBcHBsOjE6AbIFgxyLin7YPTomDO8GjqIk0OANGIwQf9TQm/mqgy8uLRksmrtIjpBRMomAHZOZIoJbr39did/huPqi5BD1YueNVcvjsagJztxOeYC4kXK1rA9NXV8wdYNMHVsBB6egMri2INu9Y2wDaxZIFAwCyZnUM5HoEo6bPS4PTV6Wj/D9W9Dhg5aDBQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-UNIQUE-CLIENT-ID="Ag==";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-LOGIN="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSDD30L7ZkJ10lh83h3RmU-0lU_Jw5AVkJiSTJbxf61ql_k-iCQ~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSE8iibcZ_L-780ynO3LvwLCFjiwzpkHlSS7tuXy7tmdTgiw7Hg~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670";Path=/;Domain=.icloud.com;Secure;HttpOnly - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Apple-Edge-Response-Time: - - '1310' - X-Apple-Jingle-Correlation-Key: - - JAYE6LRI7RC33FZENW2RWKV6G4 - X-Apple-Request-UUID: - - 48304f2e-28fc-45bd-9724-6db51b2abe37 - X-Responding-Instance: - - setupservice:33000103:mr21p30ic-hpaf07073501:8003:2020B1184:3346a0cb49a1 - access-control-expose-headers: - - X-Apple-Request-UUID,Via - apple-seq: - - '0' - apple-tk: - - 'false' - content-length: - - '5247' - via: - - 631194250daa17e24277dea86cf30319:622190a6069531a51998b9aef598f7d3:Dusseldorf + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] status: code: 200 message: OK @@ -171,7 +164,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSE8iibcZ_L-780ynO3LvwLCFjiwzpkHlSS7tuXy7tmdTgiw7Hg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" Origin: - https://www.icloud.com @@ -180,7 +173,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=220791670&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_3d67b7f2-dff0-4cbd-9475-7060d2d8e39e\"\ @@ -263,7 +256,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSE8iibcZ_L-780ynO3LvwLCFjiwzpkHlSS7tuXy7tmdTgiw7Hg~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" Origin: - https://www.icloud.com @@ -272,7 +265,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=220791670&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_3d67b7f2-dff0-4cbd-9475-7060d2d8e39e\"\ @@ -350,7 +343,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -418,7 +411,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQ0RDmdzLmljbG91ZC5hdXRovQBQDzuv81PV5krPXyCsfNZ_2r_Z-z0g-tY_O81PtPdf503MTNfBSCm8Zjw3JTzvIeCMK-hZHBmeAZvAuj5rcy0fSzmvtbKoae_ajpggFYIyvTaY_ZVRo_xA9aiIcIBaxZnqfMgv5Njvx33AIKtZBHsBBhokMw~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" Origin: - https://www.icloud.com @@ -427,7 +420,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=220791670&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"----Project-Root-Folder----\"\ @@ -1037,7 +1030,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQ0RDmdzLmljbG91ZC5hdXRovQBQDzuv81PV5krPXyCsfNZ_2r_Z-z0g-tY_O81PtPdf503MTNfBSCm8Zjw3JTzvIeCMK-hZHBmeAZvAuj5rcy0fSzmvtbKoae_ajpggFYIyvZ-MBMMrQ888zPIoH3St9hgtECAJToFp34W69M1SBhqkPDTFJQ~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" Origin: - https://www.icloud.com @@ -1046,7 +1039,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=220791670&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" :\ @@ -1155,7 +1148,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AVJB2ynqBvOIrwrV/aCApk9smjEa16Ze0c476Qt8ALg6RGHQZNFI5NYOORYnyAMf2oKOVZSUXd+F18C64bD5Y1H9kP0w/fcivpZH18VRjS3lO68tWtRxampu0uq78WO+3KbOpVcnzJy4v96BUZh0N95nGgR1ANFHopV71U3S7zmSCjP3puQq3Q=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXRXDhna0FGjRQoZy3HqqpH/Wc5JYAjEHtKc8rWk5CfFdxCkc8QfSXcpEOxL701TWMVOTcnsGpgUCgOGqrFG4Zu+T+l7GaUHOD/5YnTtNKCCo+YBRtUtXgTli7JKLy9T6t23ezB/rSvDNZiNY4v/UfpFwIqXR4kKXmFEOCWvOovXiPJfgQwkHg=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQ4RDmdzLmljbG91ZC5hdXRovQCfcA6irUm73o7I8SMuvaS43QEAScNUh1f6fqIQaXMyLUnP79wYq7WE2AdgpJd1zN8nyESbf2yHd5JluZz4JrcedK8emcEYOh2gOLjhpL6HGjGdajK9iVR5DUDC2hPZ6wLo8bB6YvixDeQf_BqdXzCktYLUCQ~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=220791670"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jEQwRDmdzLmljbG91ZC5hdXRovQDl_bGHZ22006a7OHSF_-9IaHcI-iPnH1qjk1VDiGGvLiwwVl9TM4OnAfT5A81Lx7lcJpRD9OgDowQc03ybD4ZX3XERHiHmiAHccDdwQM8tSEtsiCZZjJahoY2NDxOpD0N972WfasHR4yZCBmB71YAGX8iVnA~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=Ag==BST_IAAAAAAABLwIAAAAAF-jD2kRDmdzLmljbG91ZC5hdXRovQCN9dD3e5EHM-lvqqCEU0ugclwZ4ItpeX-rBHDGUunRBmRz26PTbJ3oQ3CEF6EkeSy-GwfdRXtoqO-dlQye6-wId_rAta1Y0n0VskBvSVo0uIt4HecZ8zpJ3P7T_pBt0okIA8NX_2ji6wS4zWNZnFX7CslWNQ~~" Origin: - https://www.icloud.com @@ -1164,7 +1157,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p53-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=220791670&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"AW0zJiqKV9sqfyLUMf0MsSskioct\"\ diff --git a/tests/vcr_cassettes/failed_auth.yml b/tests/vcr_cassettes/failed_auth.yml index 6a7b16441..6fba324fb 100644 --- a/tests/vcr_cassettes/failed_auth.yml +++ b/tests/vcr_cassettes/failed_auth.yml @@ -1,36 +1,51 @@ interactions: - request: - body: !!python/unicode '{"apple_id": "bad_username", "password": "bad_password", - "extended_login": false}' + body: !!python/unicode '{"accountName": "bad_username", "password": "bad_password", "rememberMe": + true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] + Connection: ['keep-alive'] + Content-Length: ['98'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['EC5646DE-9423-11E8-BF21-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&clientId=EC5646DE-9423-11E8-BF21-14109FE0B321&ckjsVersion=2.0.5&ckjsBuildVersion=17DProjectDev77 + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true response: - body: {string: !!python/unicode '{"success":false,"error":1}'} + body: + string: !!python/unicode '{}' headers: - access-control-allow-credentials: ['true'] - access-control-allow-origin: ['https://www.icloud.com'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-originating-system: [UnknownOriginatingSystem] - apple-seq: ['0'] - apple-tk: ['false'] - cache-control: ['no-cache, no-store, private'] - connection: [keep-alive] - content-length: ['27'] - content-type: [application/json; charset=UTF-8] - date: ['Mon, 30 Jul 2018 18:58:33 GMT'] - server: [AppleHttpServer/2f080fc0] - strict-transport-security: [max-age=31536000; includeSubDomains] - via: ['icloudedge:si03p00ic-ztde010403:7401:18RC341:Singapore'] - x-apple-jingle-correlation-key: [Q3QIQFAIYJGPRLGLP537QEIS3I] - x-apple-request-uuid: [86e08814-08c2-4cf8-accb-7f77f81112da] - x-responding-instance: ['setupservice:36400101:mr91p64ic-tyfb08043201:8001:1813B80:3b85e7d76'] - status: {code: 421, message: Misdirected Request} + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 17:28:03 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['401'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' version: 1 diff --git a/tests/vcr_cassettes/listing_albums.yml b/tests/vcr_cassettes/listing_albums.yml index 1cee4dc46..076cd4900 100644 --- a/tests/vcr_cassettes/listing_albums.yml +++ b/tests/vcr_cassettes/listing_albums.yml @@ -1,145 +1,141 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' headers: Accept: - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '87' - Cookie: - - X-APPLE-WEBAUTH-HSA-TRUST-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=IAAAAAAABLwIAAAAAFyy8iMRDmdzLmljbG91ZC5hdXRovQC85cG4zJBbdBCdB1vgowm5sABRm7HYfY61GpEUXcxASXaRf7Wp9f80mUaRo4WF8yTn16PvLWDJmNQeT2slVHEPNlzdrfnSFWn7VftAkQmQ3gjypxohF7ZCgS45kpEG3FjR-1tLMCXLs_bY5Xuis8OteQUtag~~"; - X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=IAAAAAAABLwIAAAAAFyy8hMRDmdzLmljbG91ZC5hdXRovQDtcfU1UjxOfmatejqo4w0FyqgHkZVJ3uAC-YFwI6qda4pzUbK4pDCh6LpJZ2fE8lS_9ww3O3ol2gam2UDNq3qZQpZ7o0u0dVUynJvB27X--nuAt_tXpQJK5BeMoFxgh_cZjNsisF1vOJg1KXzQ5hPuVMXF3Q~~" - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: body: - string: "{\"dsInfo\":{\"lastName\":\"Doe\",\"iCDPEnabled\":false,\"tantorMigrated\"\ - :false,\"dsid\":\"185776146\",\"hsaEnabled\":true,\"ironcadeMigrated\":true,\"\ - locale\":\"de-de_DE\",\"brZoneConsolidated\":false,\"isManagedAppleID\":false,\"\ - gilligan-invited\":\"true\",\"appleIdAliases\":[\"jdoe@me.com\",\"\ - jdoe@icloud.com\"],\"hsaVersion\":2,\"isPaidDeveloper\":false,\"countryCode\"\ - :\"DEU\",\"notificationId\":\"82947cdd-51e8-4295-884b-a87ceb766e06\",\"primaryEmailVerified\"\ - :true,\"aDsID\":\"000639-05-90e49afe-d7fc-48fd-85a1-af16160afd6a\",\"locked\"\ - :false,\"hasICloudQualifyingDevice\":true,\"primaryEmail\":\"jdoe@gmail.com\"\ - ,\"appleIdEntries\":[{\"isPrimary\":true,\"type\":\"EMAIL\",\"value\":\"jdoe@gmail.com\"\ - },{\"type\":\"EMAIL\",\"value\":\"jdoe@me.com\"},{\"type\":\"EMAIL\"\ - ,\"value\":\"jdoe@icloud.com\"}],\"gilligan-enabled\":\"true\",\"fullName\"\ - :\"John Doe\",\"languageCode\":\"de-de\",\"appleId\":\"jdoe@gmail.com\"\ - ,\"firstName\":\"John\",\"iCloudAppleIdAlias\":\"jdoe@icloud.com\"\ - ,\"notesMigrated\":true,\"hasPaymentInfo\":false,\"pcsDeleted\":false,\"appleIdAlias\"\ - :\"jdoe@me.com\",\"brMigrated\":true,\"statusCode\":2},\"hasMinimumDeviceForPhotosWeb\"\ - :true,\"iCDPEnabled\":false,\"webservices\":{\"reminders\":{\"url\":\"https://p38-remindersws.icloud.com:443\"\ - ,\"status\":\"active\"},\"notes\":{\"url\":\"https://p43-notesws.icloud.com:443\"\ - ,\"status\":\"active\"},\"mail\":{\"url\":\"https://p43-mailws.icloud.com:443\"\ - ,\"status\":\"active\"},\"ckdatabasews\":{\"pcsRequired\":true,\"url\":\"\ - https://p38-ckdatabasews.icloud.com:443\",\"status\":\"active\"},\"photosupload\"\ - :{\"pcsRequired\":true,\"url\":\"https://p38-uploadphotosws.icloud.com:443\"\ - ,\"status\":\"active\"},\"photos\":{\"pcsRequired\":true,\"uploadUrl\":\"\ - https://p38-uploadphotosws.icloud.com:443\",\"url\":\"https://p38-photosws.icloud.com:443\"\ - ,\"status\":\"active\"},\"drivews\":{\"pcsRequired\":true,\"url\":\"https://p38-drivews.icloud.com:443\"\ - ,\"status\":\"active\"},\"uploadimagews\":{\"url\":\"https://p38-uploadimagews.icloud.com:443\"\ - ,\"status\":\"active\"},\"schoolwork\":{},\"cksharews\":{\"url\":\"https://p38-ckshare.icloud.com:443\"\ - ,\"status\":\"active\"},\"findme\":{\"url\":\"https://p38-fmipweb.icloud.com:443\"\ - ,\"status\":\"active\"},\"ckdeviceservice\":{\"url\":\"https://p38-ckdevice.icloud.com:443\"\ - },\"iworkthumbnailws\":{\"url\":\"https://p38-iworkthumbnailws.icloud.com:443\"\ - ,\"status\":\"active\"},\"calendar\":{\"url\":\"https://p38-calendarws.icloud.com:443\"\ - ,\"status\":\"active\"},\"docws\":{\"pcsRequired\":true,\"url\":\"https://p38-docws.icloud.com:443\"\ - ,\"status\":\"active\"},\"settings\":{\"url\":\"https://p38-settingsws.icloud.com:443\"\ - ,\"status\":\"active\"},\"ubiquity\":{\"url\":\"https://p38-ubiquityws.icloud.com:443\"\ - ,\"status\":\"active\"},\"streams\":{\"url\":\"https://p38-streams.icloud.com:443\"\ - ,\"status\":\"active\"},\"keyvalue\":{\"url\":\"https://p38-keyvalueservice.icloud.com:443\"\ - ,\"status\":\"active\"},\"archivews\":{\"url\":\"https://p38-archivews.icloud.com:443\"\ - ,\"status\":\"active\"},\"push\":{\"url\":\"https://p38-pushws.icloud.com:443\"\ - ,\"status\":\"active\"},\"iwmb\":{\"url\":\"https://p38-iwmb.icloud.com:443\"\ - ,\"status\":\"active\"},\"iworkexportws\":{\"url\":\"https://p38-iworkexportws.icloud.com:443\"\ - ,\"status\":\"active\"},\"geows\":{\"url\":\"https://p38-geows.icloud.com:443\"\ - ,\"status\":\"active\"},\"account\":{\"iCloudEnv\":{\"shortId\":\"p\",\"vipSuffix\"\ - :\"prod\"},\"url\":\"https://p38-setup.icloud.com:443\",\"status\":\"active\"\ - },\"fmf\":{\"url\":\"https://p38-fmfweb.icloud.com:443\",\"status\":\"active\"\ - },\"contacts\":{\"url\":\"https://p38-contactsws.icloud.com:443\",\"status\"\ - :\"active\"}},\"pcsEnabled\":true,\"configBag\":{\"urls\":{\"accountCreateUI\"\ - :\"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create\"\ - ,\"accountLoginUI\":\"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d\"\ - ,\"accountLogin\":\"https://setup.icloud.com/setup/ws/1/accountLogin\",\"\ - accountRepairUI\":\"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair\"\ - ,\"downloadICloudTerms\":\"https://setup.icloud.com/setup/ws/1/downloadLiteTerms\"\ - ,\"repairDone\":\"https://setup.icloud.com/setup/ws/1/repairDone\",\"accountAuthorizeUI\"\ - :\"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d\"\ - ,\"vettingUrlForEmail\":\"https://id.apple.com/IDMSEmailVetting/vetShareEmail\"\ - ,\"accountCreate\":\"https://setup.icloud.com/setup/ws/1/createLiteAccount\"\ - ,\"getICloudTerms\":\"https://setup.icloud.com/setup/ws/1/getTerms\",\"vettingUrlForPhone\"\ - :\"https://id.apple.com/IDMSEmailVetting/vetSharePhone\"},\"accountCreateEnabled\"\ - :\"true\"},\"hsaTrustedBrowser\":true,\"appsOrder\":[\"mail\",\"contacts\"\ - ,\"calendar\",\"photos\",\"iclouddrive\",\"notes2\",\"reminders\",\"pages\"\ - ,\"numbers\",\"keynote\",\"newspublisher\",\"fmf\",\"find\",\"settings\"],\"\ - version\":2,\"isExtendedLogin\":false,\"pcsServiceIdentitiesIncluded\":true,\"\ - hsaChallengeRequired\":false,\"requestInfo\":{\"country\":\"DE\",\"timeZone\"\ - :\"GMT+1\",\"region\":\"HE\"},\"pcsDeleted\":false,\"iCloudInfo\":{\"SafariBookmarksHasMigratedToCloudKit\"\ - :true},\"apps\":{\"calendar\":{},\"reminders\":{},\"keynote\":{\"isQualifiedForBeta\"\ - :true},\"settings\":{\"canLaunchWithOneFactor\":true},\"mail\":{},\"numbers\"\ - :{\"isQualifiedForBeta\":true},\"photos\":{},\"pages\":{\"isQualifiedForBeta\"\ - :true},\"find\":{\"canLaunchWithOneFactor\":true},\"notes2\":{},\"iclouddrive\"\ - :{},\"newspublisher\":{\"isHidden\":true},\"fmf\":{},\"contacts\":{}}}" + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Apple-Originating-System: - - UnknownOriginatingSystem - Cache-Control: - - no-cache, no-store, private - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Thu, 09 May 2019 19:08:25 GMT - Server: - - AppleHttpServer/70a91026 + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] Set-Cookie: - - X-APPLE-WEBAUTH-PCS-Documents="TGlzdEFwcGw6MTpBcHBsOjE6Aet0kFgu22Q4v11Y/qOmlfbGfGmIUWbq7iLV4XgmvgI/SdE8R4ECLd8+tODOaHWTio4U9gOHEaB+7qqIFkImSgH06gUQRotD1OU8PnTOabk6W0VdmlbHeAQE6ULtSzG7XVscsiCcu5aLxA8JJtkfGnMURxfQWXLZOyWpwhwdBqH2NHaEdYxmiQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Photos="TGlzdEFwcGw6MTpBcHBsOjE6Adciqu4xi/81ZPC13IkyLFVFtr/GsgtNA0HXRnnGQgXNPlVRAbgXG/QvUYvyC9D1uKdIntFx/UMqhXDhaU5K81X77DFl7DBwI7WaT32vreJWnnfh1xVsVBSx6I2T3zchWKSdsDszFDU9Z4hsk6DIw+LGjgawT4St6sNxxnlT4+i57V+Fyeka9A==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Cloudkit="TGlzdEFwcGw6MTpBcHBsOjE6AfmAQWi6rxOCCulNRk1tj3kF2wLD7kv0YqXm8NsDKtKSBEcAY8GubLQhVQOCfRHxcDTp4OTfLemlO3qPhyuFkVa0VGOeNCIolBYVoQE9H5e+peGabTU++yv5Ve20rXwAjh8vLNvo78PxD1dTH8ynfLdAUpcaieWsJMFejPIJp7iDsmiI9o7qjw==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AbYqqDtTyT+1iBw09mXnbJkLgfk2Js0Uz34hBKAx6xub5M8neMiZaMSc15oS6KpI29jUZE6DKBTJIsX7aqIiwF6ps/FoG0oI3mQwqwZcCYvLz4T4QWOtY5+Gt47LbMfkyKW0e41JF4uqgntZBQyHhycE8WDcWNxzCOOVsGk1Rj1bVjiA5zp3ug==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Mail="TGlzdEFwcGw6MTpBcHBsOjE6AW6Gir1yEDwLQD0HgUcF3b8+d5gdgkfaQo2wQFwO568nsfVCXRsLVO9Zi1EpDhZPCaOeJ4wxZulXJxqFrMrVwOEUPXD4auTaARLSnuFu+ku/zaR1PNvNLGhVJNDeGT7KN6RGg59CViLOQCsBo2HWAVgDRojSSKTXCozQjkOlmo0ECl3sG6lfkg==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Notes="TGlzdEFwcGw6MTpBcHBsOjE6AdQ4u7cfpuNFrgK9DjTxgFFOKpa5Izbx41cE631vVcOPbxcSgf5PW5Pk5JZxFxm0uVUblDFRa6/tnoDI1ni5X5IQj9AasZaV5JWjxwr6s78OjIk7//Z/VdJqwfhVaqfQFe9tI/dgB4gvInqdSkL5mako8nf1MHQCMQZA6lhXx75EZ89/Rg5ZeQ==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-News="TGlzdEFwcGw6MTpBcHBsOjE6AfLfcn8J/HQ8lxyiQfSLE3S+lNTE38l+3QSLLPE6CCaZqewgrXQ0RnltMRhH0SYZhFp5ri4FEamk7ynO2lg4aXa6ubTSvpk9VO92yqrd7I7BkLh6O7+Xy/elmaZ0MvD0dKWyeiqgl21tdKjoF7z71oY2j0UNGb+FIzIsivmUGY7opeTxtpbDbw==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXDzBhH/Uqo2sq+Saaqbg00cX5njb3+8b3GwX/4yeRRQ0/9j8WEDDT07ZS/6RXiNGZ4QIW+Dr8DjHEkZe1z+QSZxPle7eZUrqDoOOBvTMo336k0Rv/o6m873zMuXebZSvMsNFmmmV6h7EWC4wFQVmzA06yUsqfVaGnVS3MhQ1YdIO0yHAxnELw==";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-LOGIN="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTrdyLXuVSPEQTcWV5w50PS_Azhjbb-HFG_w6bQS7fObvGRYVdQ~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTiwy_dNCsqEDy7btI5YsusdyMvbR8x1wtHTH41xpCJ2T5DiGfQ~~";Path=/;Domain=.icloud.com;Secure - - X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTn8e8w8cEKFkFglizdCuIac2hu4mY-ORpCJLg90bisJJTipVEA~~";Path=/;Domain=.icloud.com;Secure;HttpOnly - - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146";Path=/;Domain=.icloud.com;Secure;HttpOnly - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Apple-Jingle-Correlation-Key: - - QKKHZXKR5BBJLCCLVB6OW5TOAY - X-Apple-Request-UUID: - - 82947cdd-51e8-4295-884b-a87ceb766e06 - X-Responding-Instance: - - setupservice:45300303:pv43p53ic-zteg01101601:8003:1907B259:93f6a337c - access-control-expose-headers: - - X-Apple-Request-UUID - - Via - apple-seq: - - '0' - apple-tk: - - 'false' - content-length: - - '5226' - via: - - icloudedge:ds12p00ic-ztde01131201:7401:19RC123:Dusseldorf + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] status: code: 200 message: OK @@ -155,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p38-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -209,7 +205,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p38-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -278,7 +274,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AbYqqDtTyT+1iBw09mXnbJkLgfk2Js0Uz34hBKAx6xub5M8neMiZaMSc15oS6KpI29jUZE6DKBTJIsX7aqIiwF6ps/FoG0oI3mQwqwZcCYvLz4T4QWOtY5+Gt47LbMfkyKW0e41JF4uqgntZBQyHhycE8WDcWNxzCOOVsGk1Rj1bVjiA5zp3ug=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXDzBhH/Uqo2sq+Saaqbg00cX5njb3+8b3GwX/4yeRRQ0/9j8WEDDT07ZS/6RXiNGZ4QIW+Dr8DjHEkZe1z+QSZxPle7eZUrqDoOOBvTMo336k0Rv/o6m873zMuXebZSvMsNFmmmV6h7EWC4wFQVmzA06yUsqfVaGnVS3MhQ1YdIO0yHAxnELw=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTn8e8w8cEKFkFglizdCuIac2hu4mY-ORpCJLg90bisJJTipVEA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTiwy_dNCsqEDy7btI5YsusdyMvbR8x1wtHTH41xpCJ2T5DiGfQ~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTiwy_dNCsqEDy7btI5YsusdyMvbR8x1wtHTH41xpCJ2T5DiGfQ~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=IAAAAAAABLwIAAAAAFyy8hMRDmdzLmljbG91ZC5hdXRovQDtcfU1UjxOfmatejqo4w0FyqgHkZVJ3uAC-YFwI6qda4pzUbK4pDCh6LpJZ2fE8lS_9ww3O3ol2gam2UDNq3qZQpZ7o0u0dVUynJvB27X--nuAt_tXpQJK5BeMoFxgh_cZjNsisF1vOJg1KXzQ5hPuVMXF3Q~~" Origin: - https://www.icloud.com @@ -287,7 +283,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p38-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_dfc991c9-6f13-4b37-846b-606e3f31186e\"\ @@ -370,7 +366,7 @@ interactions: X-APPLE-WEBAUTH-PCS-Safari="TGlzdEFwcGw6MTpBcHBsOjE6AbYqqDtTyT+1iBw09mXnbJkLgfk2Js0Uz34hBKAx6xub5M8neMiZaMSc15oS6KpI29jUZE6DKBTJIsX7aqIiwF6ps/FoG0oI3mQwqwZcCYvLz4T4QWOtY5+Gt47LbMfkyKW0e41JF4uqgntZBQyHhycE8WDcWNxzCOOVsGk1Rj1bVjiA5zp3ug=="; X-APPLE-WEBAUTH-PCS-Sharing="TGlzdEFwcGw6MTpBcHBsOjE6AXDzBhH/Uqo2sq+Saaqbg00cX5njb3+8b3GwX/4yeRRQ0/9j8WEDDT07ZS/6RXiNGZ4QIW+Dr8DjHEkZe1z+QSZxPle7eZUrqDoOOBvTMo336k0Rv/o6m873zMuXebZSvMsNFmmmV6h7EWC4wFQVmzA06yUsqfVaGnVS3MhQ1YdIO0yHAxnELw=="; X-APPLE-WEBAUTH-TOKEN="v=2:t=IAAAAAAABLwIAAAAAFzUeqsRDmdzLmljbG91ZC5hdXRovQDLt0yBmlWeKEqUCK4Rb2q8PqCfrUifzfJJ8teReO_K45G1o0NcMXVUOA82EQfoxuHRTelz_j76GhB6arROQOtiEw5l-Gnkb3azTRqRLOy62fHR87-_1kOHvTu_lFJhNeMJcj5lL_vXw4xl_V9VRPGzw_bbyA~~"; - X-APPLE-WEBAUTH-USER="v=1:s=0:d=185776146"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTiwy_dNCsqEDy7btI5YsusdyMvbR8x1wtHTH41xpCJ2T5DiGfQ~~"; + X-APPLE-WEBAUTH-USER="v=1:s=0:d=12345678901"; X-APPLE-WEBAUTH-VALIDATE="v=1:t=IAAAAAAABLwIAAAAAFzUeqgRDmdzLmljbG91ZC5hdXRovQAqM-hMbeOKEShIoy1yCDrtQKNtmZFVXlZePfIAlM4M1_354xZEwLFvGllmNkKoz1ZhYFurK-QwOPRtZBlMOANxZ-7761dyikERBSc_V5jNTiwy_dNCsqEDy7btI5YsusdyMvbR8x1wtHTH41xpCJ2T5DiGfQ~~"; X_APPLE_WEB_KB-MCKQA0JLHJTP6TJZRX7-IO-JETW="v=1:t=IAAAAAAABLwIAAAAAFyy8hMRDmdzLmljbG91ZC5hdXRovQDtcfU1UjxOfmatejqo4w0FyqgHkZVJ3uAC-YFwI6qda4pzUbK4pDCh6LpJZ2fE8lS_9ww3O3ol2gam2UDNq3qZQpZ7o0u0dVUynJvB27X--nuAt_tXpQJK5BeMoFxgh_cZjNsisF1vOJg1KXzQ5hPuVMXF3Q~~" Origin: - https://www.icloud.com @@ -379,7 +375,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p38-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\"\ diff --git a/tests/vcr_cassettes/listing_photos.yml b/tests/vcr_cassettes/listing_photos.yml index 95f44a56f..56e71e9e7 100644 --- a/tests/vcr_cassettes/listing_photos.yml +++ b/tests/vcr_cassettes/listing_photos.yml @@ -1,39 +1,144 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: - body: {string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"94bcf24a-9d6a-4e28-97b7-ee836ad4c104","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: Access-Control-Allow-Credentials: ['true'] Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:37:02 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [SS6PESU5NJHCRF5X52BWVVGBAQ] - X-Apple-Request-UUID: [94bcf24a-9d6a-4e28-97b7-ee836ad4c104] - X-Responding-Instance: ['setupservice:21000203:nk11p10me-setupsvc002:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK - request: body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' headers: @@ -46,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -99,7 +204,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -154,7 +259,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_e53446cf-3885-4cd3-8f12-648289d79769\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -198,7 +303,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" @@ -796,7 +901,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n @@ -868,7 +973,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"AY6c+BsE0jjaXx9tmVGJM1D2VcEO\",\n \ \"recordType\" : \"CPLMaster\",\n \"fields\" : {\n \"resVidSmallHeight\" @@ -44681,7 +44786,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{}" diff --git a/tests/vcr_cassettes/listing_photos_bad_filename.yml b/tests/vcr_cassettes/listing_photos_bad_filename.yml index c19245f23..2f2cbf3fc 100644 --- a/tests/vcr_cassettes/listing_photos_bad_filename.yml +++ b/tests/vcr_cassettes/listing_photos_bad_filename.yml @@ -1,39 +1,144 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true response: - body: {string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"94bcf24a-9d6a-4e28-97b7-ee836ad4c104","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: Access-Control-Allow-Credentials: ['true'] Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:37:02 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [SS6PESU5NJHCRF5X52BWVVGBAQ] - X-Apple-Request-UUID: [94bcf24a-9d6a-4e28-97b7-ee836ad4c104] - X-Responding-Instance: ['setupservice:21000203:nk11p10me-setupsvc002:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK - request: body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' headers: @@ -46,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -114,7 +219,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_911a39bc-1c9a-4dcd-88be-6673de6d7b6e\",\n @@ -185,7 +290,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -239,7 +344,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" @@ -837,7 +942,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n @@ -909,7 +1014,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"AY6c+BsE0jjaXx9tmVGJM1D2VcEO\",\n \ \"recordType\" : \"CPLMaster\",\n \"fields\" : {\n \"resVidSmallHeight\" @@ -44722,7 +44827,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/modify?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{}" diff --git a/tests/vcr_cassettes/listing_photos_missing_downloadUrl.yml b/tests/vcr_cassettes/listing_photos_missing_downloadUrl.yml index 81ef034c2..e02a983d5 100644 --- a/tests/vcr_cassettes/listing_photos_missing_downloadUrl.yml +++ b/tests/vcr_cassettes/listing_photos_missing_downloadUrl.yml @@ -1,39 +1,144 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: - body: {string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"94bcf24a-9d6a-4e28-97b7-ee836ad4c104","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: Access-Control-Allow-Credentials: ['true'] Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:37:02 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [SS6PESU5NJHCRF5X52BWVVGBAQ] - X-Apple-Request-UUID: [94bcf24a-9d6a-4e28-97b7-ee836ad4c104] - X-Responding-Instance: ['setupservice:21000203:nk11p10me-setupsvc002:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK - request: body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' headers: @@ -46,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -99,7 +204,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -155,7 +260,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -200,7 +305,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" @@ -799,7 +904,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n @@ -871,7 +976,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"AY6c+BsE0jjaXx9tmVGJM1D2VcEO\",\n \ \"recordType\" : \"CPLMaster\",\n \"fields\" : {\n \"resVidSmallHeight\" diff --git a/tests/vcr_cassettes/listing_photos_missing_filenameEnc.yml b/tests/vcr_cassettes/listing_photos_missing_filenameEnc.yml index 754112a74..ec55cc3eb 100644 --- a/tests/vcr_cassettes/listing_photos_missing_filenameEnc.yml +++ b/tests/vcr_cassettes/listing_photos_missing_filenameEnc.yml @@ -1,39 +1,144 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://setup.icloud.com/setup/ws/1/accountLogin response: - body: {string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"94bcf24a-9d6a-4e28-97b7-ee836ad4c104","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: Access-Control-Allow-Credentials: ['true'] Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:37:02 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [SS6PESU5NJHCRF5X52BWVVGBAQ] - X-Apple-Request-UUID: [94bcf24a-9d6a-4e28-97b7-ee836ad4c104] - X-Responding-Instance: ['setupservice:21000203:nk11p10me-setupsvc002:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK - request: body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' headers: @@ -46,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -99,7 +204,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -154,7 +259,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -200,7 +305,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" @@ -798,7 +903,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n @@ -870,7 +975,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"AY6c+BsE0jjaXx9tmVGJM1D2VcEO\",\n \ \"recordType\" : \"CPLMaster\",\n \"fields\" : {\n \"resVidSmallHeight\" diff --git a/tests/vcr_cassettes/listing_photos_no_delete.yml b/tests/vcr_cassettes/listing_photos_no_delete.yml index b60f87157..7e68d3860 100644 --- a/tests/vcr_cassettes/listing_photos_no_delete.yml +++ b/tests/vcr_cassettes/listing_photos_no_delete.yml @@ -1,39 +1,144 @@ interactions: - request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "password": "password1", + "rememberMe": true, "trustTokens": []}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['111'] + Content-Type: ['application/json'] Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 + uri: https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true response: - body: {string: '{"dsInfo":{"lastName":"Broadbent","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["ndbroadbent@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"94bcf24a-9d6a-4e28-97b7-ee836ad4c104","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"Nathan - Broadbent","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"Nathan","iCloudAppleIdAlias":"ndbroadbent@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-I-Rscd: ['409'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: Access-Control-Allow-Credentials: ['true'] Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:37:02 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [SS6PESU5NJHCRF5X52BWVVGBAQ] - X-Apple-Request-UUID: [94bcf24a-9d6a-4e28-97b7-ee836ad4c104] - X-Responding-Instance: ['setupservice:21000203:nk11p10me-setupsvc002:8003:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p00ic-zteu070419:7401:18RC341:Singapore'] - status: {code: 200, message: OK} + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK - request: body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' headers: @@ -46,7 +151,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_ac333066-5d55-4c42-b033-f05bb9d2873c\",\n \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" @@ -114,7 +219,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: string: "{\n \"records\" : [ {\n \"recordName\" : \"_911a39bc-1c9a-4dcd-88be-6673de6d7b6e\",\n @@ -185,7 +290,7 @@ interactions: User-Agent: - Opera/9.52 (X11; Linux i686; U; en) method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list response: body: string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n @@ -238,7 +343,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" @@ -836,7 +941,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n @@ -908,7 +1013,7 @@ interactions: Referer: ['https://www.icloud.com/'] User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True + uri: https://p61-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=12345678901&remapEnums=True&getCurrentSyncToken=True response: body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"AY6c+BsE0jjaXx9tmVGJM1D2VcEO\",\n \ \"recordType\" : \"CPLMaster\",\n \"fields\" : {\n \"resVidSmallHeight\" diff --git a/tests/vcr_cassettes/successful_auth.yml b/tests/vcr_cassettes/successful_auth.yml index 9d4daccd8..50968aabb 100644 --- a/tests/vcr_cassettes/successful_auth.yml +++ b/tests/vcr_cassettes/successful_auth.yml @@ -1,37 +1,96 @@ interactions: - request: - body: !!python/unicode '{"apple_id": "jdoe@gmail.com", "password": "password1", - "extended_login": false}' + body: 'null' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] + Connection: ['keep-alive'] + Content-Length: ['4'] + Cookie: + - X-APPLE-UNIQUE-CLIENT-ID="EQ=="; X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901"; X_APPLE_WEB_KB-A0OXAM_WG97BH5FBDJFP8-DKXTW="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890="; + X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-HSA-TRUST-A0OXAM_WG97BH5FBDJFP8-DKXTW="v=1:t=EQ==BST_IAAAAAAABL-1234567890~"; + X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890="; + X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890="; + X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890="; + X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890="; Origin: ['https://www.icloud.com'] Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&clientId=EC5646DE-9423-11E8-BF21-14109FE0B321&ckjsVersion=2.0.5&ckjsBuildVersion=17DProjectDev77 + uri: https://setup.icloud.com/setup/ws/1/validate response: - body: {string: !!python/unicode '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"123456789","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"234234234c95-863a-234234b4","primaryEmailVerified":true,"aDsID":"23423423423432c2-d234234680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7","isAppleInternal":true},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":1,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":false,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' headers: - access-control-allow-credentials: ['true'] - access-control-allow-origin: ['https://www.icloud.com'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-originating-system: [UnknownOriginatingSystem] - apple-seq: ['0'] - apple-tk: ['false'] - cache-control: ['no-cache, no-store, private'] - connection: [keep-alive] - content-length: ['4895'] - content-type: [application/json; charset=UTF-8] - date: ['Mon, 30 Jul 2018 19:02:14 GMT'] - server: [AppleHttpServer/2f080fc0] - strict-transport-security: [max-age=31536000; includeSubDomains] - via: ['icloudedge:si03p01ic-ztde010422:7401:18RC341:Singapore'] - x-apple-jingle-correlation-key: [SDFUHISDUFHIDSUFHISDUHFDF] - x-apple-request-uuid: [SDFOISDUMFIUSDMFIUHDSIFUHDSJF] - x-responding-instance: ['setupservice:12341234234:mr90p54ic-12341234234:8003:1813B80:3b85e7d76'] - status: {code: 200, message: OK} + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~~";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK version: 1