Hello! I’ve had to modify the 2SA authentication example in the readme because I’m creating an Alfred 3 workflow, so the first script looks like this:
‘’'
import sys, os, time
from workflow import Workflow3, ICON_WARNING, Variables
log = None
device = sys.argv[0]
def main(wf):
from pyicloud import PyiCloudService
login_info = None
for line in open("apidata.txt", "r").readlines():
login_info = line.split()
api = PyiCloudService(login_info[0], login_info[1])
api.send_verification_code(device)
if name == "main":
wf = Workflow3()
log = wf.logger
sys.exit(wf.run(main))
‘''
So that first script seems to work fine and send the verification code to whichever device the user has selected.
The problem is, in the second script, once the user has input their verification code, api.validate_verification_code(device, code) sends ANOTHER iCloud popup!
‘’'
import sys, os
from workflow import Workflow3, ICON_WEB, ICON_WARNING
auth_code = sys.argv[0]
def main(wf):
from pyicloud import PyiCloudService
login_info = None
for line in open("apidata.txt", "r").readlines():
login_info = line.split()
api = PyiCloudService(login_info[0], login_info[1])
if not api.validate_verification_code(auth_code):
wf.add_item(title="Failed to verify!",
subtitle='Please try again', valid="No", icon=ICON_WARNING)
wf.send_feedback()
else:
wf.add_item(title="Verified!",
subtitle='Use keyword "overhere" to find your lost device', valid="No")
wf.send_feedback()
if name == 'main':
wf = Workflow3()
log = wf.logger
wf.run(main)
‘’'
Alfred-workflow uses python 2.7, so I’m not sure if that’s the issue, or is it something to do with calling pyicloud from a different python program? I’m new to Python so sorry if this is a stupid question!
iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.While the cost of storage seems expensive in comparison to other online storage services, its advantage is that it works natively across all your devices.
Read more details: https://bit.ly/3xezpE1
>>> from pyicloud import PyiCloudService
>>> api = PyiCloudService('jappleseed@apple.com', 'password')
deny
and I can still access all the phone data
Hey all.
Anyone knows how can I use this service on c# ?
I am trying to integrate iCloud location services to our project. I can only get the location for 2 minutes, then program throws an exception code 450. But as I can see, python code gets the location with no problem. I have been testing it nearly 30 minutes and there is no problem with it.
Hello guys,
I am also working on a new iCloud feature hide my mail, i just want to auto create hide my mail mails and save them into a csv file. I am a beginner and I want to log in to iCloud using post requests and then create those mails. Can somebody help me just get a log in function
Thanks :))