Back

Create document with relation user_unauthorized

  • 0
  • Self Hosted
  • Databases
  • Web
Petchav
21 Apr, 2024, 12:47

I can't create a document with relations. If I delete my relations before the createDocument() function, my document is created. But it doesn't work with realtions.

In the appwrite console, I've created an api key with all the permissions.

TypeScript
response: {
    message: 'The current user is not authorized to perform the requested action.',
    code: 401,
    type: 'user_unauthorized',
    version: '1.5.4'
  }

Thank you for your help

TL;DR
Developers having issues creating a document with relations despite deleting relations before using createDocument(). They have an API key with all permissions. Solution: The error message indicates user authorization issues with the API key. Double-check the permissions settings and ensure they have the necessary permissions to perform the action.
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