Back

Appwrite Collection creation using API

  • 0
  • Databases
  • Flutter
sandeephifx
25 Apr, 2023, 09:13

Is it possible to create a database collection in Appwrite using REST API from flutter code?

TL;DR
The user wants to know if they can create a database collection in Appwrite using the REST API from Flutter code. It is not recommended to use the API key in the frontend for security reasons. The user can use the Server SDK instead. Another option is to create a cloud function that can be executed manually from the client side.
Maniac_Fighter
25 Apr, 2023, 09:18

Creating collection from Client side SDK is prohibited due to security reasons. You can use the Server SDK for that (though its not recommend to use in the client apps)

One thing you can do is create a cloud function and you can execute this manually from client side

sandeephifx
25 Apr, 2023, 11:26

Thank You

Bouahaza
25 Apr, 2023, 13:38

You can via REST, on client or server. Just need to pass key

Bouahaza
25 Apr, 2023, 13:38

You can't via client side sdk, like @Maniac_Fighter explain. But if you use fetch from browser (or other), np

Bouahaza
25 Apr, 2023, 13:39

Nevertheless, it's not recommended to use API Key in frontend

Bouahaza
25 Apr, 2023, 13:41

If all is ok for you. Don't forget to add [SOLVED] at begin of your post title, by editing it

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