Roborock Go SDK
OpenapiAuthentication

Login Code

Reference contract from the pinned Python Roborock web API; caller selects the region explicitly.

POST
/api/v4/auth/email/login/code

Header Parameters

header_clientid*string
header_clientlang*"en"

Value in

  • "en"
x-mercy-ks*string
x-mercy-k*string
header_appversion*"4.54.02"

Value in

  • "4.54.02"
header_phonesystem*"iOS"

Value in

  • "iOS"
header_phonemodel*"iPhone16,1"

Value in

  • "iPhone16,1"

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v4/auth/email/login/code" \  -H "header_clientid: string" \  -H "header_clientlang: en" \  -H "x-mercy-ks: string" \  -H "x-mercy-k: string" \  -H "header_appversion: 4.54.02" \  -H "header_phonesystem: iOS" \  -H "header_phonemodel: iPhone16,1" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'code=001234&country=GB&countryCode=44&email=synthetic%40example.test&majorVersion=19&minorVersion=1'
{  "code": 0,  "data": {    "avatarurl": "string",    "country": "string",    "countrycode": "string",    "nickname": "string",    "region": "string",    "rriot": {      "h": "string",      "k": "string",      "r": {        "a": "string",        "l": "string",        "m": "string",        "r": "string",        "property1": null,        "property2": null      },      "s": "string",      "u": "string",      "property1": null,      "property2": null    },    "rruid": "string",    "token": "string",    "tokentype": "string",    "tuyaDeviceState": 0,    "uid": 0,    "property1": null,    "property2": null  },  "msg": "string",  "property1": null,  "property2": null}