TedGreg2022Original post
Web Developer
Hey for one of my use cases I need to get my current logged in user's team. But by default the scope to read the team is not added.
Plain text
const teams = appwriteClient.teams; const myTeams = await teams.list();The above code returns :
Plain text
api-1 | message: 'User (role: guests) missing scope (teams.read)',api-1 | code: 401,api-1 | type: 'general_unauthorized_scope',api-1 | version: '1.6.2'api-1 | }How do I add the teams.read scope. I'm using the node-sdk with google oauth2.
I can add scopes, but these are internal google oauth scopes, not appwrite ones.
Summary
Developers are trying to get the current user's team using Appwrite, but they are facing an unauthorized scope issue. The error message indicates that the user is missing the 'teams.read' scope. To resolve this, they need to add the 'teams.read' scope in the Appwrite settings, not the internal Google OAuth scopes.