1. Account Authentication
OpenAPI
  • Account Authentication
    • Login
      POST
  • Wattsonic OpenAPI
    • Query real time info
      POST
    • Unbind MQTT topic
      POST
    • Bind MQTT topic
      POST
    • Remote Operate WattMate
      POST
    • Remote Config WattMate
      POST
    • Query WattMate history
      GET
  • Real-time Data
    • Quick Start
    • Subscription of real-time data
    • `fields` Parameter for /ws/openapi/wattmate/tsd
  • Schemas
    • Schemas
      • OpenApiBindEvent
      • OpenApiAuthenticateEvent
      • ResultString
    • LocalTime
    • ResultVoid
    • ResultWattMateVo
    • WattMateVo
    • WmHeater
    • WmNetwork
    • WmPlan
    • WattMateUnbindTopicEvent
    • WattMateBindTopicEvent
    • WattMateOperateEvent
    • WattMateConfigEventV2
    • WattMatePlan
    • LoginEvent
    • ResultWattsonicToken
    • WattsonicToken
    • ResultListWattMateVo
  1. Account Authentication

Login

POST
/login

Request

Header Params

Body Params application/jsonRequired

Example
{
    "username": "string",
    "password": "string"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.wattdesk.com/login' \
--header 'Platform: Web' \
--header 'APPS: DESK' \
--header 'Access-Token: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "string",
    "password": "string"
}'

Responses

🟢200成功
*/*
OK
Body

Example
{
    "code": "0000",
    "msg": "string",
    "data": {
        "accessToken": "string",
        "refreshToken": "string"
    }
}
Modified at 2025-12-12 08:12:16
Next
Query real time info
Built with