Skip to content
Back

Python SDK: users.get(user_id) error : 400 request cannot have request body

  • 1
  • Auth
  • Cloud
lucas 🚀
17 Apr, 2025, 12:57

I am using the Python SDK version 9.0.3 (latest) and I am seeing this generic HTTP error pop up.

400 request cannot have request body

The code is dead simple :

TypeScript
from appwrite.client import Client
from appwrite.services.databases import Databases
from appwrite.services.users import Users
from appwrite.exception import AppwriteException

from app.core.config import settings

client = Client()
(client
  .set_endpoint(settings.appwrite_endpoint)
  .set_project(settings.appwrite_project_id)
  .set_key(settings.appwrite_api_key)
)

database = Databases(client)
users = Users(client)

def verify_user_id(user_id: str) -> bool:
    try:
        users.get(user_id)
        return True
    except AppwriteException as e:
        print(f"Error verifying user ID '{user_id}' : {e.code} {e.response} {e.message}")
        return False

Other support requests seem to have the same problem since the release of the Network feature.

Has anyone found a fix for this?

TL;DR
Developers using Python SDK version 9.0.3 are encountering a '400 request cannot have request body' error when using the `users.get(user_id)` function. This error seems to be linked to the Network feature update. A potential fix for this issue has not been identified at this time.
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