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

# Timeout User

First get a cookie. Then, use socket.io to send the message 'timeoutUser'

[block:code]
{
  "codes": [
    {
      "code": "headers = {'content-type': 'application/json'}\nurl = \"https://letsrobot.tv/api/v1/authenticate\"\npayload = {'username':'RobotGuy', 'password':'mypassword'}\nresponse = requests.request(\"POST\", url, data=json.dumps(payload), headers=headers)\nprint response\nsocketIO = SocketIO('https://letsrobot.tv', 8000, LoggingNamespace, cookies={'connect.sid' : response.cookies['connect.sid']})\n\nsocketIO.emit('timeoutUser', { 'username': 'trollyMcTrollface', 'robot_id': '1234567', 'robot_name': 'AnyBot'}) ",
      "language": "python"
    }
  ]
}
[/block]