Log user into the system
Log a user into the system.
GET https://petstore3.swagger.io/api/v3/user/login
Examples
- API Key
- OAuth 2.0
cURL
GET "https://petstore3.swagger.io/api/v3/user/login?username=string&password=string" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"
cURL
GET "https://petstore3.swagger.io/api/v3/user/login?username=string&password=string" \
-H "accept: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
| 400 | Invalid username/password supplied |
| default | Unexpected error |
Response example
200: Successful operation
Response
{
"message": "logged in user session:abcdef12345"
}
Headers
| Name | Description | Type |
|---|---|---|
X-Rate-Limit | Calls per hour allowed by the user. | integer |
X-Expires-After | Date in UTC when token expires. | string |
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
username | string | The username for login. |
password | string | The password for login in clear text. |