Hello there, I was trying to access a funtion i create via appwrite cloud as a logged in user via sveltekit but on function it's seeing my request as guest while on app, it's showing as logged in
what am I doing wrong
export const doFunction = (functionId, query) => { console.log('query: ', query); return functions.createExecution( FUNCTIONS[functionId], JSON.stringify(query) ).then(function (response) { console.log('A document', response); return { status: 200, // total: response.total, response: JSON.parse(response.responseBody) }; }).catch(function (error) { console.log(error); if (error.code == 401) { if (error.type == 'user_unauthorized') { alert(error.message) goto('/auth/login') } } return { status: error.code, errorType: error.type, error: error.messages }; }); };
This is how my request look like
Recommended threads
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...