Skip to content

[FEATURE] Support for Advanced Data Protection (iCloud Encryption) #20

@DominoDrifter

Description

@DominoDrifter

Use case
Now that Apple has rolled out Advanced Data protection globally it's only a matter of time before the masses adopt it and it has potential to be enabled by default for new iCloud accounts soon enough, it would be great to get this project compatible with ADP for people already using it and those who will start to use it in future.

Describe the solution you'd like
Being able to download iCloud photos that are end to end encrypted.

Describe alternatives you've considered
Disabling ADP, but this is less desirable as it's a long overdue feature from Apple

Additional context
If you have ADP enabled on your iCloud account, this is what happens after authenticating (with 2FA) with this project:

Loading config from /app/config.yaml ...
Loading config from /app/config.yaml ...
2023-02-04 14:51:49,566 :: INFO :: root :: sync.py :: 71 :: Syncing drive...
2023-02-04 14:51:50,125 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing PCS cookies from the request (423)
Traceback (most recent call last):
  File "/app/./src/main.py", line 7, in <module>
    sync.sync()
  File "/app/src/sync.py", line 72, in sync
    sync_drive.sync_drive(config=config, drive=api.drive)
  File "/app/src/sync_drive.py", line 304, in sync_drive
    items=drive.dir(),
  File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 234, in __getattr__
    return getattr(self.root, attr)
  File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 229, in root
    self, self.get_node_data("FOLDER::com.apple.CloudDocs::root")
  File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 34, in get_node_data
    request = self.session.post(
  File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/app/venv/lib/python3.10/site-packages/icloudpy/base.py", line 158, in request
    self._raise_error(code, reason)
  File "/app/venv/lib/python3.10/site-packages/icloudpy/base.py", line 187, in _raise_error
    raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Missing PCS cookies from the request (423)

Sub-issues

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Projects

Status

🆕 Incoming

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions