Back

[SOLVED] Unauthorized to create a document in a database

  • 0
  • Databases
  • Web
7777Chaitanya
4 Jan, 2024, 04:15

Hey. I am trying to create a document in a DB in a Next.js project. My app doesn't have any authentication. I am getting 401 unauthorized error while creating a document. Can someone help me with this?

TL;DR
User is having an issue with unauthorized access to create a document in a database. The solution is to go into the Collection, select the Settings tab, and give All permissions on the Collection.
ideclon
4 Jan, 2024, 04:19

Have you given All permissions on the Collection?

7777Chaitanya
4 Jan, 2024, 04:21

Hey @ideclon , I couldn't find the settings in teh UI to give modify permisson of collection. Could you please guide me?

ideclon
4 Jan, 2024, 04:22

Sure. Go into the Collection, then select the Settings tab. Permissions is the fourth card down.

7777Chaitanya
4 Jan, 2024, 04:28

It's right in front of my eyes and I had to spend so much effort to find it. Thank you @ideclon πŸ˜…

ideclon
4 Jan, 2024, 04:29

No problem! If your issue has been solved, you can mark this post as closed by adding β€œ[SOLVED]” to the beginning of the title

7777Chaitanya
4 Jan, 2024, 04:29

[SOLVED] Unauthorized to create a document in a database

7777Chaitanya
4 Jan, 2024, 04:30

done!

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