Skip to content
Back

Global Variables

  • 0
  • General
  • Auth
  • REST API
  • Cloud
Felipe Amaral
9 Jun, 2025, 16:43

I'm building a Azure DevOps Pipeline Task to deploy my functions to Appwrite using REST APIs. How can I set project global variables via REST? This endpoint does not work with project API Key.

TypeScript
POST /project/variables HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.7.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <API_KEY>
{
    "key": "test",
    "value": "test"
}

Im getting this return:

TypeScript
{
    "message": "app.xxxxxx@service.nyc.cloud.appwrite.io (role: applications) missing scope (projects.write)",
    "code": 401,
    "type": "general_unauthorized_scope",
    "version": "1.7.4"
}
TL;DR
Developers want to set project global variables in Appwrite using REST APIs, but are facing authorization issues. The error message indicates a missing "projects.write" scope for the specified role. To resolve this, grant the necessary scope to the API Key in order to successfully set project global variables.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more