This tutorial describes how to use the Next Token with a robot. This applies to both physical and simulated robots.
This tutorial requires creating a LGDXRobot Cloud API Key but does not require authentication.
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
class Handler(BaseHTTPRequestHandler):
def do_POST(self):
length = int(self.headers['Content-Length'])
body = self.rfile.read(length)
data = json.loads(body)
print(data)
self.send_response(200)
self.end_headers()
self.wfile.write(b'OK')
HTTPServer(('', 8000), Handler).serve_forever()
server.py and run it using python server.py.| Field | Value |
|---|---|
| Name | Test |
| URL | http://127.0.0.1:8000 |
| Method | POST |
In the body, set the following properties:
| Key | Value |
|---|---|
| TaskId | Task ID |
| RobotId | Robot ID |
| NextToken | Next Token |




https://localhost:5163/Automation/AutoTasksApi/AutoTaskNext and set the method to POST.X-API-Key and set the value to the API Key.
{
"taskId": <Task ID>,
"robotId": "<Robot ID>",
"nextToken": "<Next Token>"
}


https://localhost:5163/Automation/AutoTasksApi/AutoTaskAbort and set the method to POST.X-API-Key and set the value to the API Key.
{
"taskId": <Task ID>,
"robotId": "<Robot ID>",
"nextToken": "<Next Token>"
}
