---
updatedAt: 2026-05-12T10:00:26.000Z
---

# Log in to API

This operation enables you to log in to the API as a Sentinel user.<br><br>**NOTE:** This operation only accepts request bodies sent over SSL as application/x-www-form-urlencoded.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "User API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/user/{username}/login": {
      "post": {
        "tags": [
          "User API v1.0"
        ],
        "summary": "Log in to API",
        "description": "This operation enables you to log in to the API as a Sentinel user.<br><br>**NOTE:** This operation only accepts request bodies sent over SSL as application/x-www-form-urlencoded.",
        "operationId": "loginToAPI",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "description": "username of the Sentinel user.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Password of sentinel username specified in URL.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides information on the Sentinel user who just logged into the API.",
            "headers": {},
            "content": {
              "application/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "404": {
            "description": "NotFoundResponse indicates a request for a resource that does not exist.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```