I'm running a function locally with dynamic API key to create users with scopes users.read and users.write (cf image)
But when I create an user
await users.create(userId: userId);
await users.createSession(userId: userId);
I get the following error:
Error while creating user: AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (users.write) (401)
Any idea what's wrong ?
TL;DR
Developers encountering issues with creating users with dynamic API keys and scopes. When attempting to create a user, an error appears stating unauthorized scope for user with role 'guests'. This problem occurs due to missing required scope 'users.write'. Ensure the dynamic key grants necessary permissions for user creation.