Rank 2: Process
Hello how do I get the user session if it's not directly from a user?
const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with
const databases = new sdk.Databases(client);
const result = await databases.updateDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId '<DOCUMENT_ID>', // documentId {}, // data (optional) ["read("any")"] // permissions (optional));```
A webhook is calling this function not directly from a user