Hi, I have a self-hosted Appwrite instance and I can’t quite figure out how to create a server-side API that lets me automate the creation of projects. The only API key I’ve seen is the one that allows access to specific projects, but I need a more general one. Maybe it’s a configuration variable to set in the .env file. Thanks for the help.
TL;DR
To use a server API key in your code with the Appwrite API, set up a console session using the provided code snippet. Make sure to include the correct email and password in the session creation. Remember to add the session cookie to your headers for subsequent API calls. 9 Nov, 2025, 17:34
Hello, any help?
10 Nov, 2025, 03:36
you can setup a console session
10 Nov, 2025, 03:38
TypeScript
const session = await axios.post(
endpoint + accountPath,
{
email: <email>,
password: <password>,
},
{
headers: {
'content-type': 'application/json',
'X-Appwrite-Project': 'console',
},
}
);
const sessionCookie = session.headers['set-cookie'][0];
// now make any call using:
// headers: {
// 'content-type': 'application/json',
// 'X-Appwrite-Project': 'console',
// Cookie: sessionCookie,
// },
Recommended threads
- hi guys! my site is not accesible in my ...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...