Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foxt/icloud.js
Library for accessing iCloud in Node.js
https://github.com/foxt/icloud.js
find-my-iphone icloud icloud-calendars icloud-drive nodejs
Last synced: 3 months ago
JSON representation
Library for accessing iCloud in Node.js
- Host: GitHub
- URL: https://github.com/foxt/icloud.js
- Owner: foxt
- License: mit
- Created: 2022-11-15T19:34:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T12:47:27.000Z (8 months ago)
- Last Synced: 2024-04-14T07:59:21.553Z (7 months ago)
- Topics: find-my-iphone, icloud, icloud-calendars, icloud-drive, nodejs
- Language: TypeScript
- Homepage: https://npmjs.com/icloudjs
- Size: 172 KB
- Stars: 33
- Watchers: 5
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# iCloud.js
*iCloud.js is an independent project, and is not affiliated, endorsed, recommended by or otherwise affiliated with Apple Inc.*iCloud.js is a library for interacting with Apple's iCloud services for Node.js.
## Thanks
This library would not be possible without the help of:
- [pyicloud](https://github.com/picklepete/pyicloud)
- [iCloud Photos Sync](https://github.com/steilerDev/icloud-photos-sync)## Usage
Check the [examples](https://github.com/foxt/icloud.js/tree/master/test), or read the [API reference](https://foxt.dev/icloud.js/classes/index.default.html)
### Basic example
```js
// for TypeScript, use:
import iCloud from "icloudjs";
// for JavaScript, use:
const { default: iCloud } = require('icloudjs');const icloud = new iCloud({
username: "[email protected]",
password: "hunter2",
saveCredentials: true,
trustDevice: true,
authMethod: "srp"
})
await icloud.authenticate()
console.log(icloud.status)
if (icloud.status === "MfaRequested") {
await icloud.provideMfaCode("123456")
}
await icloud.awaitReady;
console.log("Hello, " + icloud.accountInfo.dsInfo.fullName)
return icloud
```