You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Require the module
const iCloud = require('apple-icloud');
var session = {}; // An empty session. Has to be a session object or file path that points on a JSON file containing your session
var username = "xxx"; // Your apple id
var password = "xxxx"; // Your password
I can only get first 500 contacts ..
Here is my code
`
// Require the module
const iCloud = require('apple-icloud');
var session = {}; // An empty session. Has to be a session object or file path that points on a JSON file containing your session
var username = "xxx"; // Your apple id
var password = "xxxx"; // Your password
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
})
var myCloud = new iCloud("icloud-session.json", username, password);
myCloud.on("ready", function() {
console.log("Ready Event!");
// Check if the two-factor-authentication is required
if (myCloud.twoFactorAuthenticationIsRequired) {
// Get the security code using node-prompt
readline.question("Enter Code:", (code) => {
myCloud.securityCode = code;
readline.close()
});
}
else {
console.log("You are logged in completely!");
myCloud.Contacts.list(function(err, data) {
if (err) return console.error(err);
// Successfully your contacts :)
// console.log(data);
console.log(data.contacts.length);
});
}
});
`
The text was updated successfully, but these errors were encountered: