import { Account, Client, Databases } from "appwrite";
const APPWRITE_ENDPOINT = import.meta.env.VITE_APPWRITE_ENDPOINT;
const APPWRITE_PROJECT_ID = import.meta.env.VITE_APPWRITE_PROJECT_ID;
const APPWRITE_API_ID = import.meta.env.VITE_APPWRITE_API_KEY;
const client = new Client()
.setEndpoint(APPWRITE_ENDPOINT)
.setProject(APPWRITE_PROJECT_ID)
.setKey(APPWRITE_API_KEY); // This code doesn't work
export const account = new Account(client);
export const databases = new Databases(client);
Would like to get supported
It should be setKey and not setkey
Sorry, just spell mistake. However, doesn't work
You cannot/should not use API keys client side. That's why the method doesn't exist
I'm getting that setKey does not exist on Client class
Oh yes as @Steven say, setKey is for server SDK
Then should I transfer from client-side to server-side?
Which one is better? node-appwrite or appwrite?
It just depends on what you want to do
Why is there a lot of limitations in client side Appwrite?
Are you allowed to go to GitHub and fetch all users with their hashed passwords and emails?
Recommended threads
- How to disable appwrite/embedding from s...
Hi everyone! I'm currently running a self-hosted instance of Appwrite. For my current use case, I don't need the AI/embedding features, and I noticed the `app...
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Git connection is not working anymore on...
Hello all, I updated from 1.8.1 to 1.9.0 then 1.9.5. All seems to work even the Github connection. In Git configuration I see my Github user but when trying to...