Skip to content
Back

signupUser function is failing w the error:Error: User (role: guests) missing scope (users.write)

  • 0
  • Auth
  • Functions
  • Cloud
Dishan
26 Aug, 2025, 17:11

Hello! I'm having a persistent issue with an Appwrite Function and would appreciate any help.

What I've Checked :

  • Function Settings : Execute Access is set to Guests.
  • Environment Variables : APPWRITE_API_KEY, APPWRITE_FUNCTION_ENDPOINT, and APPWRITE_FUNCTION_PROJECT_ID are all set correctly in the function's settings.
  • API Key : The key used in the environment variables has the users.write scope.
  • Troubleshooting : I have already tried deleting and completely recreating the function, but the error persists.

Important Note : The function works perfectly when I test it locally on my computer (VS Code) with the API key hardcoded. The error only happens on the deployed version.

My Project Info :

  • Project ID: 68aaf0dc00014c211992
  • Function ID: 68aca96c003aab851446
  • Runtime: Node.js-22

Thank you for your help!

TL;DR
The signupUser function is failing due to a missing scope error. The issue occurs in the deployed version but not locally. Checked function settings, environment variables, and API key. Have tried recreating the function to no avail. Ensure the key has users.write scope, especially in the deployed environment. Solution: Verify the API key's scope in the deployed environment and ensure it includes users.write.
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