what do you mean? what code?
In the pictures
Are you still asking about the setKey()?
Your code looks like you're trying to initialize the client. Yiu can initialize the client anywhere in your code
It's best to have just one instance of Client though
@Steven I am talking about this
Please don't tag (@) people directly. Why do you need the API key?
An API key is needed in Appwrite only when creating cloud functions.
I mean you should never try using an Appwrite API key client side because:
- It's not needed
- It's not possible in client side SDK's
- That allows the one that has such key having unlimited access to the given scopes (bypassing permissions)
So where should the server side be?
For server side API like Appwrite functions then you set API key, but as said, never set API key client side
So in Appwrite?
If you use Appwrite with a custom server or in Appwrite functions, as said, just if you execute the code server-sided
In your case, just don't set API key and done
How about user?
User don't need API key
But how to fix it
Just remove .setKey line
As said, never use .setKey in your app
@C09 have you read through the docs?
oh...where?
Sorry my friend just got me into this for a school project
Have a read through the docs and feel free to ask questions!
andm ake sure you're using the apple sdk: https://github.com/appwrite/sdk-for-apple
Recommended threads
- Current User Is Not Authorized To Perfor...
I keep getting an error saying the current user is not authorized to perform the requested action, when I'm trying to create a row a table. Permissions have bee...
- storage copy file?
hey everyone, does anyone know if we can copy a file in storage. I have some base files that i want to copy for each user based on what they choose. I couldnt f...
- [BUG] The cloud cannot be migrated to se...
The cloud cannot be migrated to self-hosting. The content of this post is exactly the same as [issue 11068](https://github.com/appwrite/appwrite/issues/11068) ...