The following code leads to this error,
const account = new Account(client);
const user = await account.get();
It happens on a local deployed function (deployed to my local docker instance). The function has been invoked from the client SDK, but this code got problem.
The APPWRITE_FUNCTION_API_ENDPOINT has an value of http://localhost/v1, is it correct?
The client is being initialized like this:
const client = new Client()
.setEndpoint(Bun.env["APPWRITE_FUNCTION_API_ENDPOINT"])
.setProject(Bun.env["APPWRITE_FUNCTION_PROJECT_ID"])
.setKey(req.headers["x-appwrite-key"]);
// Get JWT token from headers
const jwt = req.headers["x-appwrite-user-jwt"];
if (jwt) {
client.setJWT(jwt);
}
Recommended threads
- [SDK] [Postman] Can't post to Users usin...
when trying to post to users I'm getting missing scopes and at the same time I'm getting an authorised scope How do I generate an API and get around this issue
- Docker Compose MongoDB Setup
everythings work fine but the mongodb fails on startup everytime. log: ``` Generating random MongoDB keyfile... /bin/bash: line 9: : No such file or directory ...
- Auth broken after update from 1.8.0 to 1...
So ive been having issues creating, deleting or updating users on my appwrite instance after i updated from 1.8.0 to version 1.9.0. When trying to create a user...