---
agentTools:
  projectIndex: https://letsrobot.readme.io/llms.txt
---

# Authenticate User

Validates whether the provided username and password matches a user on the server.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API V1",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://letsrobot.tv/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/authenticate": {
      "post": {
        "summary": "Authenticate User",
        "description": "Validates whether the provided username and password matches a user on the server.",
        "operationId": "authenticate-user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "password"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Currently the username is case sensitive, but this may change"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"user\": {\n        \"_id\": \"58044b08bb8968d00fa67161\",\n        \"username\": \"theodore\",\n        \"moderator\": false,\n        \"email\": \"theo@letsrobot.tv\",\n        \"ignored_users\": [],\n        \"paypal_url\": \"\",\n        \"nonspendable_robits\": 100000,\n        \"profile_description\": \"I'm theodore\",\n        \"createdAt\": \"2017-07-27T02:15:56.360Z\",\n        \"updatedAt\": \"2017-07-27T08:10:34.760Z\",\n        \"allowed_users\": [],\n        \"moderators\": [],\n        \"_flags\": [\n            \"59799bf4afab1780434266d3\",\n            \"59799cc0a90809807025af0c\",\n            \"59799f5513a4ee80b140e828\",\n            \"59799fa2ef5e7b80eab040d8\",\n            \"59799ffac5782a8107b82d2c\"\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "example": "58044b08bb8968d00fa67161"
                        },
                        "username": {
                          "type": "string",
                          "example": "theodore"
                        },
                        "moderator": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "email": {
                          "type": "string",
                          "example": "theo@letsrobot.tv"
                        },
                        "ignored_users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "paypal_url": {
                          "type": "string",
                          "example": ""
                        },
                        "nonspendable_robits": {
                          "type": "integer",
                          "example": 100000,
                          "default": 0
                        },
                        "profile_description": {
                          "type": "string",
                          "example": "I'm theodore"
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2017-07-27T02:15:56.360Z"
                        },
                        "updatedAt": {
                          "type": "string",
                          "example": "2017-07-27T08:10:34.760Z"
                        },
                        "allowed_users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "moderators": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "_flags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "59799bf4afab1780434266d3"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "Unauthorized"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "python",
              "code": "import requests\nimport json\nheaders = {'content-type': 'application/json'}\nurl = \"https://letsrobot.tv/api/v1/authenticate\"\npayload = {'username':'jill', 'password':'notmyrealpassword'}\nresponse = requests.request(\"POST\", url, data=json.dumps(payload), headers=headers)\nresponse"
            },
            {
              "language": "curl",
              "code": "curl -H \"Content-Type: application/json\" -X POST -d '{\"username\":\"theodore\",\"password\":\"highentropypassword\"}' http://letsrobot.tv/api/v1/authenticate\n"
            }
          ],
          "samples-languages": [
            "python",
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5b999649b30a100003d54aaa:5b999649b30a100003d54ace"
}
```