
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.
TypeScript
const teams = appwriteClient.teams;
const myTeams = await teams.list();
The above code returns :
TypeScript
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.
TL;DR
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.Recommended threads
- Google auth
Hi, Guys can you hel me verifing a problem with the database, im creating a auth with google but when i created my user with google auth, no appear my user in ...
- Appwrite New York is 500 Internal Error
- How to Query more than 25 items from the...
So I've added this to my query to try and defeat the default 25 item limit: ``` do { const response = await databases.listDocuments( ...
