# Authorize + get code in one step
curl -s -X POST http://localhost:3001/v1/authorize \
-H "Authorization: Bearer sandbox-api-key-local" \
-H "Content-Type: application/json" \
-d '{"agentId":"<id>","principalId":"test-user","scopes":["calendar:read"]}'
# → { ..., "sandbox": true, "code": "01J..." }
# Exchange immediately for a grant token
curl -s -X POST http://localhost:3001/v1/token \
-H "Authorization: Bearer sandbox-api-key-local" \
-H "Content-Type: application/json" \
-d '{"code":"<code>","agentId":"<id>"}'