Skip to content

Instantly share code, notes, and snippets.

@os11k
Created October 21, 2024 09:01
Show Gist options
  • Select an option

  • Save os11k/501d7b2be09c6bba0e734485cce28365 to your computer and use it in GitHub Desktop.

Select an option

Save os11k/501d7b2be09c6bba0e734485cce28365 to your computer and use it in GitHub Desktop.
Save token to icloud
let token = "change_me"; // Replace with your actual access token
// Path to the token file in iCloud (Scriptable iCloud directory)
let filePath = FileManager.iCloud().joinPath(FileManager.iCloud().documentsDirectory(), "threads_token.txt");
// Save the token in the file
FileManager.iCloud().writeString(filePath, token);
console.log("Token saved to iCloud.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment