pyicloud
pyicloud copied to clipboard
421 Authentication Error
The problem
Environment
- pyiCloud release with the issue (
pip show pyicloud
): 1.0.0 - Service causing this issue: Reminders & Calendar
- Python version (
python -V
): 3.9.6 - Operating environment (project deps/Docker/Windows/etc.): MacOS 14
Traceback/Error logs
Traceback (most recent call last):
File "/Users/******/Documents/School/Schoology Automations/AutoAssign/AutoAssign.py", line 56, in <module>
print(api.calendar.events())
File "/Users/******/Library/Python/3.9/lib/python/site-packages/pyicloud/services/calendar.py", line 64, in events
self.refresh_client(from_dt, to_dt)
File "/Users/******/Library/Python/3.9/lib/python/site-packages/pyicloud/services/calendar.py", line 57, in refresh_client
req = self.session.get(self._calendar_refresh_url, params=params)
File "/Users/******/Library/Python/3.9/lib/python/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "/Users/******/Library/Python/3.9/lib/python/site-packages/pyicloud/base.py", line 131, in request
return self.request(method, url, **kwargs)
File "/Users/******/Library/Python/3.9/lib/python/site-packages/pyicloud/base.py", line 133, in request
self._raise_error(response.status_code, response.reason)
File "/Users/******/Library/Python/3.9/lib/python/site-packages/pyicloud/base.py", line 189, in _raise_error
raise api_error
pyicloud.exceptions.PyiCloudAPIResponseException: Authentication required for Account. (421)
Checklist
- [x ] I've looked informations into the README.
- [ ] I've looked informations into the pyiCloud's code.
- [x] I've looked informations in Google.
Additional information
I've seen other posts about this issue for the calendar service, but not for the reminders event. I have 2fa turned on if it matters.
See my fix in #406
It solves the auth issue, but leaves you with the iCloud reminders upgrade response. Apple made a change a few years back [will post a new issue]
@russinnes, any luck here with reminders? I'm not getting the list of reminders, neither can I post anything.
404 errors and missing lists.