I have below GET request "/auth-users" endpoint. Which can get all the users and I want to list Identities. But right now I am getting error like AppwriteException: general_unauthorized_scope, app.23sefesf32r23rwewefwe@service.cloud.appwrite.io (role: applications) missing scope (account) (401)
is there any way to get all the Identities without active session for all the users?
if (request.method == 'GET') { if (request.path == "/auth-users") { final client = Client() .setEndpoint( Platform.environment['APPWRITE_FUNCTION_API_ENDPOINT'] ?? '') .setProject( Platform.environment['APPWRITE_FUNCTION_PROJECT_ID'] ?? '') .setKey(context.req.headers['x-appwrite-key'] ?? ''); final users = Users(client); // Account account = Account(client);
final userdata = await users.list();
context.log('Total users: ${userdata.total}');
// How can I get all the Identities
// IdentityList userIdentityList = await account.listIdentities();
// context.log('Total identities: ${userIdentityList.total}');
} }
Recommended threads
- Appwrite 1.8.1 TablesDB Permissions Issu...
Hi - I'm migrating a newer VueJS web application from Supabase to Appwrite. I'm looking for an experienced Appwrite Developer to help me solve a permissions iss...
- Functions not executing after usage rese...
Hi team, Last month my project hit 100% usage and functions stopped working (expected). Now the new month has started and usage has reset, requests are going ...
- Relations within the same table
Hello, I'm currently building a sort of dictionary (a literal one) and thus I need words (which is one single table of words in my database) to be able to have ...