Back

401 error while accessing documents from a collection.

  • 0
  • Web
sharadjaiswal
3 Jun, 2024, 12:52

https://cloud.appwrite.io/v1/databases/6634aff3001750676b50/collections/6634bd780003c3878416/documents?queries%5B0%5D=%7B%22method%22%3A%22equal%22%2C%22attribute%22%3A%22AccountID%22%2C%22values%22%3A%5B%2266447c6000159d7cf05c%22%5D%7D 401 (Unauthorized) (anonymous) @ appwrite.js?v=08d2d413:412 (anonymous) @ appwrite.js?v=08d2d413:28 __awaiter @ appwrite.js?v=08d2d413:10 call @ appwrite.js?v=08d2d413:371 (anonymous) @ appwrite.js?v=08d2d413:2194 (anonymous) @ appwrite.js?v=08d2d413:28 __awaiter @ appwrite.js?v=08d2d413:10 listDocuments @ appwrite.js?v=08d2d413:2181 getCurrentUser @ api.ts:90 await in getCurrentUser (async) checkAuthUser @ AuthContext.tsx:45 (anonymous) @ AuthContext.tsx:72 commitHookEffectListMount @ chunk-P3FVMTXM.js?v=e32c9684:16936 commitPassiveMountOnFiber @ chunk-P3FVMTXM.js?v=e32c9684:18184 commitPassiveMountEffects_complete @ chunk-P3FVMTXM.js?v=e32c9684:18157 commitPassiveMountEffects_begin @ chunk-P3FVMTXM.js?v=e32c9684:18147 commitPassiveMountEffects @ chunk-P3FVMTXM.js?v=e32c9684:18137 flushPassiveEffectsImpl @ chunk-P3FVMTXM.js?v=e32c9684:19518 flushPassiveEffects @ chunk-P3FVMTXM.js?v=e32c9684:19475 (anonymous) @ chunk-P3FVMTXM.js?v=e32c9684:19356 workLoop @ chunk-P3FVMTXM.js?v=e32c9684:197 flushWork @ chunk-P3FVMTXM.js?v=e32c9684:176 performWorkUntilDeadline @ chunk-P3FVMTXM.js?v=e32c9684:384 Show 19 more frames Show less (index):1 Third-party cookie will be blocked. Learn more in the Issues tab. api.ts:108 AppwriteException: The current user is not authorized to perform the requested action. at Client.<anonymous> (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=08d2d413:421:17) at Generator.next (<anonymous>) at fulfilled (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=08d2d413:13:24)

TL;DR
Developers are getting a 401 error when trying to access documents from a collection due to lack of authorization. They are receiving "The current user is not authorized to perform the requested action" message. The issue may be related to authentication or user permissions. Double-check authentication processes and user roles to resolve the 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