iCloud-API icon indicating copy to clipboard operation
iCloud-API copied to clipboard

Only 500 contacts

Open fdl33333 opened this issue 6 years ago • 2 comments

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); }); } });

`

fdl33333 avatar Nov 21 '19 16:11 fdl33333

Hi,

I am getting this error on Contacts.list method, Can you please help me { reason: 'Missing X-APPLE-WEBAUTH-TOKEN cookie', error: 1 }

Thanks Arvind

arvind-adita avatar Mar 17 '20 09:03 arvind-adita

I would also be interesting in this fix. Getting the same error.

chleca avatar Apr 25 '20 11:04 chleca