Back

[SOLVED] Cloud Server REST API - I cannot list out databases using REST API - I passed in API key

  • 1
  • Self Hosted
  • Cloud
Rick
22 Oct, 2023, 03:34
  • I am using Cloud - Server REST APIs
  • I am using Postman to send RESTful request to list out databases at /databases?search=
  • I did pass in the API key (which enabled all scopes) at X-Appwrite-Key
  • I did login with a create email session at /account/sessions/email

But I get this error How should I set permission?

TL;DR
The user was having trouble listing out databases using the Cloud Server REST API, even though they had passed in the API key. Another user advised them to remove the user session, which solved the issue. The original user asked if they should delete the user session, and the response was yes. It was also mentioned that the project ID should be sent along with the request. The role "users" indicated that a user session was being used instead of the API key. There was no solution provided for setting permissions, but it was mentioned that the error message could help with troubleshooting.
Drake
22 Oct, 2023, 03:39

role: users means a user session is being used rather than the API key

Drake
22 Oct, 2023, 03:40

Are you sending the project id too?

Rick
22 Oct, 2023, 03:48

yes, I also sending project ID

Rick
22 Oct, 2023, 03:48

should I delete the user session?

Rick
22 Oct, 2023, 03:50

removing the user session did help me 👍

Rick
22 Oct, 2023, 03:54

thank you @Steven

Rick
22 Oct, 2023, 04:44

[SOLVED] Cloud Server REST API - I cannot list out databases using REST API - I passed in API key

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