Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
Appwrite - JWT doesn't allow to access documents

I'm unable to make a request to my backend using a JWT created when the user logs in in the frontend.

Everytime I try, even if the access to the collection is set to role:all, I get this error from the backend:

{
    "statusCode": 500,
    "code": "401",
    "error": "Internal Server Error",
    "message": "<User> (role: member) missing scope (collections.read)"
}

I'm using Appwrite Node SDK for server part and Appwrite web sdk in the frontend.

This is my login script where I generate the JWT token:

import { Appwrite } from "appwrite";

export const login = async (email, password) => {
    const api = new Appwrite();
    api.setEndpoint(import.meta.env.VITE_APPWRITE_URL);
    api.setProject(import.meta.env.VITE_APPWRITE_PROJECT);
    await api.account.createSession(email, password);
    const user = await api.account.get();
    const jwt = await api.account.createJWT();
    return {
        jwt: jwt.jwt,
        user: {
            id: user.$id,
            email: user.email,
            name: user.name
        },
    }
}

What am I missing?

Note: I am running everything inside Docker containers.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!