
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe "Robots are not allowed" error you're encountering with the Sanity Users API has been resolved! Here's what happened and how to fix it:
The Access API (which includes the Users endpoint at api.sanity.io/vX/access/projects/{projectId}/users) was initially configured to only accept personal user tokens, not robot tokens. This was an intentional restriction when the API was first released.
Good news: As of January 17, 2025, the Sanity backend team pushed a change that now allows you to use robot tokens with the Access API.
You can now access the Users API with a standard robot token:
Create a robot token in your project's management console:
Use the correct API version - Replace vX with an actual API version like v2025-01-09 (format: vyyyy-mm-dd)
Make your request with the robot token:
curl -H "Authorization: Bearer YOUR_ROBOT_TOKEN" \
https://YOUR_PROJECT.api.sanity.io/v2025-01-09/access/projects/YOUR_PROJECT_ID/usersIf for some reason you still need to use a personal token, you can get yours by running:
sanity debug --secretsLook for the "Auth token" value under "Authentication". However, this is no longer necessary since robot tokens now work with the Access API.
v2025-01-09), not vX, v2, or v3As explained in the Sanity authentication documentation:
The issue has been resolved at the platform level, so you should now be able to access the Users API with your robot token without any "Robots are not allowed" errors!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store