DishanOriginal post
Web Developer
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!
Summary
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.