Status code 400 on set 2fa code
bushaev-denis opened this issue · comments
Hello, this library still WIP?
I always get error when i set security code
const iCloud = require('icloudjs').default
const path = require('path')
const prompt = require('prompt')
const icloud = new iCloud({
username: "my_apple_id",
password: "my_password",
saveCredentials: true,
trustDevice: true,
dataDirectory: path.resolve('./tmp/')
});
(async() => {
await icloud.authenticate()
if (icloud.status === "MfaRequested") {
const code = await prompt.get(['2fa code'])
await icloud.provideMfaCode(code)
}
await icloud.awaitReady;
console.log("Hello, " + icloud.accountInfo.dsInfo.fullName)
})();
PS: also tried enter code without any space
Hello, this library still WIP?
Yes, however authenticaation & read only access to certain services (if you'd like a service prioritised please let me know)
A 400 error code usually indicates that the code was incorrect. I've just published a 1.2.1 version to NPM which should give you more details about why it failed.
Thanks
Yes, however authenticaation & read only access to certain services (if you'd like a service prioritised please let me know)
Actually i want help you with this library :)
Now i write screensaver for my android tv, and i want write calendar and photos services for your library.
@foxt Yeah, you right. Thanks a lot!