# API scope \`all-users\` not working anymore

**URL:** https://meta.discourse.org/t/api-scope-all-users-not-working-anymore/399597
**Category:** Development
**Tags:** rest-api
**Created:** [March 30, 2026, 9:25pm UTC](https://meta.discourse.org/t/api-scope-all-users-not-working-anymore/399597 "2026-03-30T21:25:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [March 30, 2026, 9:25pm UTC](https://meta.discourse.org/t/api-scope-all-users-not-working-anymore/399597/1 "2026-03-30T21:25:30Z")

</div>

I have this snip of Python, which previously generated a user and had them like a post.

```plaintext
i = i + extra
            pw = nanoid.generate(size=150)
            name = f"User{nanoid.generate(size=5, alphabet='abcdefghijklmnopqrstuvwxyz')}.{i}"

            username = str(name)
            print(f"spam_{i}@notpyx.me")

            resp = httpx.post(
                url="https://discourse.pyxfluff.dev/users.json",
                json={
                    "name": f"User.{i}",
                    "email": f"discourse.{i}@notpyx.me",
                    "username": username,
                    "password": str(pw),
                    "active": True,
                    "approved": True,
                },
                headers={"Api-Key": API_KEY, "Api-Username": "system"},
            )
            resp.raise_for_status()

            rp(f"[green]Made {username}: {pw}[/]")

            if like_post_id:
                try:
                    print(
                        httpx.post(
                            url="https://discourse.pyxfluff.dev/post_actions.json",
                            json={"id": int(like_post_id), "post_action_type_id": 2},
                            headers={"Api-Key": API_KEY, "Api-Username": username},
                        ).json()
                    )

```

Afterwards it would generate and send a post. However, sometime in the last month it stopped working and only gives 400s.

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/d/8/cd87b7a823e22b75762efe5368f2814b19ead70f.png)

This script worked perfectly fine a while back. Did something change I’m not aware of?
