
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
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Row with the requested ID already exists...
I’m hitting a blocking issue creating rows in Appwrite (both from the console and my React Native app). After successfully inserting the first row, every subseq...
