Skip to content
Back

functions returning error 401 in local

  • 0
  • 3
  • Self Hosted
  • Functions
Navy_cs
21 Apr, 2026, 04:15

I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running version 1.9.0 locally and the functions are working, please share your configuration.

TL;DR
Function returning error 401 in local environment when using Appwrite, despite valid API key and scoped enabled. Error message includes Appwrite HTML response. Issue arises when calling certain actions. Solution involves ensuring correct scopes and API key setup for Appwrite to handle the necessary actions successfully.
21 Apr, 2026, 07:55

<@743532656767270934> we have one more prob with 1.9.0

21 Apr, 2026, 07:58

can u share details on the error?

21 Apr, 2026, 08:14

Any action that requires Appwrite, such as adding a label to a user or reading a row from a table, results in Appwrite error 401. I’ve made sure that the scopes are enabled in the function and that the API key is also set up correctly, but I can’t seem to get past this error. The error returns the HTML code from the Appwrite local page.

21 Apr, 2026, 08:18

which role does it say ur missing?

21 Apr, 2026, 08:29

❌ [ERROR_CRÍTICO] Fallo en la ejecución: Traceback (most recent call last): File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/appwrite/client.py", line 138, in call response.raise_for_status() File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/requests/models.py", line 1028, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://host.docker.internal/v1/tablesdb/6945cc99000d95f0df59/tables/news_settings/rows/69d35996003523499b28?queries%5B0%5D=%7B%22method%22%3A%22select%22%2C%22values%22%3A%5B%22%2A%22%2C%22style.%2A%22%2C%22settingsIA.sumarizePrompt%22%2C%22settingsIA.modelsFallback%22%2C%22settingsIA.modelsIA.models%22%2C%22feeds.url%22%2C%22feeds.isActive%22%2C%22feeds.type%22%2C%22feeds.errorCounter%22%5D%7D

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/server/src/function/src/main.py", line 188, in get_main_config doc = tablesDB.get_row( ^^^^^^^^^^^^^^^^^ File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/appwrite/services/tables_db.py", line 4055, in get_row response = self.client.call('get', api_path, { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/appwrite/client.py", line 160, in call raise AppwriteException(response.text, response.status_code, None, response.text) appwrite.exception.AppwriteException: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">...

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