{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/users/authorize",
  "title": "Authorize user requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/users/authorize/",
  "summary": "Users authorization requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [POST](#post-authorize) | `/v1/users/authorize` | Authorize a user |\n\n## Authorize user {#post-authorize}\n\n    POST /v1/users/authorize\n\nGenerate a JSON Web Token (JWT) for a user to use as authorization to access the REST API.\n\n### Request {#post-request}\n\n#### Example HTTP request\n\n    POST /v1/users/authorize\n\n#### Example JSON body\n\n  ```json\n  {\n      \"username\": \"user@redislabs.com\",\n      \"password\": \"my_password\"\n  }\n  ```\n\n#### Request headers\n| Key    | Value            | Description         |\n|--------|------------------|---------------------|\n| Host   | cnm.cluster.fqdn | Domain name         |\n| Accept | application/json | Accepted media type |\n\n#### Request body\n\nInclude a [JWT authorize object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/jwt_authorize) with a valid username and password in the request body.\n\n### Response {#post-response}\n\nReturns a JSON object that contains the generated access token.\n\n#### Example JSON body\n\n  ```json\n  {\n      \"access_token\": \"eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU\"\n  }\n  ```\n\n### Error codes {#post-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `message` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| password_expired | The password has expired and must be changed. |\n\n### Status codes {#post-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The user is authorized. |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request could not be understood by the server due to malformed syntax. |\n| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-10-21T09:46:20-07:00"
}
