Let's Robot

Welcome to the Let's Robot network. You'll find comprehensive guides and documentation to help you start working with Let's Robot as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation
Suggest Edits

Authenticated User Details

 
gethttps://letsrobot.tv/api/v1/accounts
curl --request GET \
  --url https://letsrobot.tv/api/v1/accounts
var request = require("request");

var options = { method: 'GET', url: 'https://letsrobot.tv/api/v1/accounts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/api/v1/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://letsrobot.tv/api/v1/accounts");

xhr.send(data);
import requests

url = "https://letsrobot.tv/api/v1/accounts"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"username": "Sherlouk",
	"profile_description": "I am a user!",
	"subscriptions": [{
		"robot_id": "123456",
		"robot_name": "PonyBot",
		"owner": "rick"
	}],
	"avatar": {
		"large": "http://rmr-images-test.s3.amazonaws.com/users/profiles/Sherlouk_large.png",
		"medium": "http://rmr-images-test.s3.amazonaws.com/users/profiles/Sherlouk_medium.png",
		"thumbnail": "http://rmr-images-test.s3.amazonaws.com/users/profiles/Sherlouk_thumbnail.png"
	},
	"robots": [],
	"spendable_robits": 1000,
	"nonspendable_robits": 0
}
{
  "error": "couldn't find account"
}
 
Suggest Edits

Authenticate User

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

 
posthttps://letsrobot.tv/api/v1/authenticate
import requests
import json
headers = {'content-type': 'application/json'}
url = "https://letsrobot.tv/api/v1/authenticate"
payload = {'username':'theodore', 'password':'highentropypassword'}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers)
response
curl -H "Content-Type: application/json" -X POST -d '{"username":"theodore","password":"highentropypassword"}' http://letsrobot.tv/api/v1/authenticate
A binary file was returned

You couldn't be authenticated

{
    "user": {
        "_id": "58044b08bb8968d00fa67161",
        "username": "theodore",
        "moderator": false,
        "email": "theo@letsrobot.tv",
        "ignored_users": [],
        "paypal_url": "",
        "nonspendable_robits": 100000,
        "profile_description": "I'm theodore",
        "createdAt": "2017-07-27T02:15:56.360Z",
        "updatedAt": "2017-07-27T08:10:34.760Z",
        "allowed_users": [],
        "moderators": [],
        "_flags": [
            "59799bf4afab1780434266d3",
            "59799cc0a90809807025af0c",
            "59799f5513a4ee80b140e828",
            "59799fa2ef5e7b80eab040d8",
            "59799ffac5782a8107b82d2c"
        ]
    }
}
Unauthorized

Body Params

username
string
required

Currently the username is case sensitive, but this may change

password
string
required
 
Suggest Edits

Register New User

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://letsrobot.tv/api/v1/register
curl --request POST \
  --url https://letsrobot.tv/api/v1/register
var request = require("request");

var options = { method: 'POST', url: 'https://letsrobot.tv/api/v1/register' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/api/v1/register")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://letsrobot.tv/api/v1/register");

xhr.send(data);
import requests

url = "https://letsrobot.tv/api/v1/register"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

username
string
required
password
string
required
email
string
required
 
Suggest Edits

Subscribe to Robot

Subscribes the current authenticated user to the provided robot.

 
posthttps://letsrobot.tv/api/v1/accounts/subscribe
curl --request POST \
  --url https://letsrobot.tv/api/v1/accounts/subscribe
var request = require("request");

var options = { method: 'POST',
  url: 'https://letsrobot.tv/api/v1/accounts/subscribe' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/api/v1/accounts/subscribe")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://letsrobot.tv/api/v1/accounts/subscribe");

xhr.send(data);
import requests

url = "https://letsrobot.tv/api/v1/accounts/subscribe"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "robot_id": "123456",
    "subscribed": true,
    "robot_name": "TrumpBot",
    "status": "online",
    "robot_description": null,
    "owner": "rick",
}

Body Params

robot_id
string
required
 
Suggest Edits

Unsubscribe from Robot

 
posthttps://letsrobot.tv/api/v1/accounts/unsubscribe
curl --request POST \
  --url https://letsrobot.tv/api/v1/accounts/unsubscribe
var request = require("request");

var options = { method: 'POST',
  url: 'https://letsrobot.tv/api/v1/accounts/unsubscribe' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/api/v1/accounts/unsubscribe")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://letsrobot.tv/api/v1/accounts/unsubscribe");

xhr.send(data);
import requests

url = "https://letsrobot.tv/api/v1/accounts/unsubscribe"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "robot_id": "123456"
}

Body Params

robot_id
string
required
 
Suggest Edits

Logout User

 
gethttps://letsrobot.tv/logout
curl --request GET \
  --url https://letsrobot.tv/logout
var request = require("request");

var options = { method: 'GET', url: 'https://letsrobot.tv/logout' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/logout")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://letsrobot.tv/logout");

xhr.send(data);
import requests

url = "https://letsrobot.tv/logout"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Forgotten Password

 
posthttps://letsrobot.tv/api/v1/accounts/forgot
curl --request POST \
  --url https://letsrobot.tv/api/v1/accounts/forgot
var request = require("request");

var options = { method: 'POST',
  url: 'https://letsrobot.tv/api/v1/accounts/forgot' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/api/v1/accounts/forgot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://letsrobot.tv/api/v1/accounts/forgot");

xhr.send(data);
import requests

url = "https://letsrobot.tv/api/v1/accounts/forgot"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "error": "error occurred sending password reset email"
}

Body Params

email
string
required
 
Suggest Edits

Reset Password

 
posthttps://letsrobot.tv/reset/token
curl --request POST \
  --url https://letsrobot.tv/reset/token
var request = require("request");

var options = { method: 'POST',
  url: 'https://letsrobot.tv/reset/token' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/reset/token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://letsrobot.tv/reset/token");

xhr.send(data);
import requests

url = "https://letsrobot.tv/reset/token"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "error": "unable to find user"
}

Path Params

token
string
required

The token is sent to the user via email after using the "Forgotten Password" API

Body Params

password
string
required

The new password that the account should be set to

 
Suggest Edits

All Public Robots

 
gethttps://letsrobot.tv/internal
curl --request GET \
  --url https://letsrobot.tv/internal
var request = require("request");

var options = { method: 'GET', url: 'https://letsrobot.tv/internal' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/internal")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://letsrobot.tv/internal");

xhr.send(data);
import requests

url = "https://letsrobot.tv/internal"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "robots": [{
    "name": "Roboxae",
    "owner": "javixae",
    "id": "67320597",
    "status": "online",
    "subscribed": false
  }, {
    "name": "Robort",
    "owner": "LetsRobot",
    "id": "55248801",
    "status": "offline",
    "subscribed": false,
    "avatar": {
      "large": "http://rmr-images-test.s3.amazonaws.com/users/profiles/55248801_large.jpg",
      "medium": "http://rmr-images-test.s3.amazonaws.com/users/profiles/55248801_medium.jpg",
      "thumbnail": "http://rmr-images-test.s3.amazonaws.com/users/profiles/55248801_thumbnail.jpg"
    },
    "avatar_approved": true
  }]
}
 
Suggest Edits

Robot Information

 
gethttps://letsrobot.tv/internal/robot/robot_id
curl --request GET \
  --url https://letsrobot.tv/internal/robot/robot_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://letsrobot.tv/internal/robot/robot_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://letsrobot.tv/internal/robot/robot_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://letsrobot.tv/internal/robot/robot_id");

xhr.send(data);
import requests

url = "https://letsrobot.tv/internal/robot/robot_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "robot_id": "48853711",
  "robot": {
    "robot_id": "48853711",
    "camera_id": "18459619",
    "robot_name": "TrumpBot",
    "status": "online",
    "charging": false,
    "subscribers": ["username"],
    "robot_description": null,
    "panels": null,
    "custom_panels": null,
    "allow_anonymous_control": true,
    "owner": "rick",
    "public": true,
    "strong_filtering": false,
    "mute": false,
  }
}

Path Params

robot_id
string
required
 
Suggest Edits

Send Chat Message

 

Authentication

Anonymous chatting is supported for non authenticated users, in order to have a proper username accompany the chat message you should first ensure that user is authenticated via the appropriate endpoint.

let payload = [
    "message": "[TrumpBot] \(message)",
    "robot_name": "TrumpBot",
    "robot_id": "123456",
    "secret": "iknowyourelookingatthisthatsfine"
]
        
socket.emit("chat_message", payload)
Suggest Edits

Basic Socket

 

We use Socket.IO in order to handle communication between all our clients and the server. In order to emit and receive messages you will need to setup a socket with the URL https://runmyrobot.com:8000!

We recommend finding the SDK for your given language.

let url = URL(string: "https://runmyrobot.com:8000")!
let socket = SocketIOClient(socketURL: url)
// ...
Suggest Edits

Timeout User

 

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

headers = {'content-type': 'application/json'}
url = "https://letsrobot.tv/api/v1/authenticate"
payload = {'username':'theodore', 'password':'highentropypassword'}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers)
print response
socketIO = SocketIO('https://letsrobot.tv', 8000, LoggingNamespace, cookies={'connect.sid' : response.cookies['connect.sid']})

socketIO.emit('timeoutUser', { 'username': 'trollyMcTrollface', 'robot_id': '1234567', 'robot_name': 'TheoBot'})