Back

[Solved] Create Document Error

  • 0
  • Databases
  • Web
  • Users
ajay -groot
13 Oct, 2023, 18:23

Hello I am facing the isssue that current user is not authorized in create Document

code async createPost({ title, content, image, status, userId }) { try { return await this.database.createDocument( conf.appwriteDatabaseId, conf.appwriteCollectionId, ID.unique(), { title, content, image, status, userId } ); } catch (error) { console.log("Appwrite Error ::: createPost error:::", error); } }

TL;DR
The user was facing an issue where they were not authorized to create a document. The issue was resolved by giving the necessary permissions in the collection. The user thanked everyone and mentioned their excitement to deploy their first application on appwrite.
Drake
13 Oct, 2023, 18:44

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.

Drake
13 Oct, 2023, 18:45

what are the permissions on the collection?

ajay -groot
14 Oct, 2023, 04:49

Thank you my issue is now resolve i don't give any permission in collection Thank you i am excited to deploy my first application on appwrite <:react:637383195503099915>

ajay -groot
14 Oct, 2023, 04:52

[Solved] Create Document Error

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