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 not working in a React App
Authentication with Google has failed. It redirects back to the signin route in React. Attached screenshots for configuration of Google console and Appwrite Go...
- Dokploy docker compose
Hey guys hope y'all doing well, I was wondering if anyone could share a working 1.8.0 docker-compose that works with Dokploy I tried making it but it just does...
- i need help!
I was working on my project and I just can't stop receiving this message. Is something wrong?