Back

after generating an api key how to set it up in the client side in flutter

  • 0
  • Android
  • Flutter
  • Apple
Ansh
25 May, 2023, 05:29

after generating an api key how to set it up in the client side in flutter/dart

TL;DR
The user is asking how to set up an API key in the client side in Flutter. One response suggests using the `createExecution` function with the function ID. Another response explains that API keys generated in the Appwrite console should only be used for cloud functions and not in the client side. The solution is to not use an API key in the client side at all.
safwan
25 May, 2023, 05:34

You should never use an API key in the client side.

safwan
25 May, 2023, 05:34

API keys that you generate in the Appwrite console should only be used for cloud functions

safwan
25 May, 2023, 05:34

Mind if I ask why you're trying to use an API key in the client-side?

Ansh
25 May, 2023, 05:35

i am making a chat app and i need to make new collections for each user everytime there is a new group of two trying to chat

Ansh
25 May, 2023, 05:36

i am using no-signal approach for making this app

Ansh
25 May, 2023, 05:37

it is there in awesome appwrite

safwan
25 May, 2023, 05:38

okay that's good. but i'm still not sure why ypu need to use an API key in the client side?

Ansh
25 May, 2023, 05:39

because without an api key you cant make new collections

safwan
25 May, 2023, 05:39

you can create a cloud function to create a collection for the new user, which requires an API key. But that's supposed to be set inside the function itself

safwan
25 May, 2023, 05:40

if you are executing the function on the client side, just call createExecution with the functionID

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more