Get Token by Smart Matching

Last Updated on : 2023-06-20 14:54:01download

According to the entered learning code, the background intelligently matches the remote control list and returns a token. And then, get the matching result based on the token.

API address

POST: /v2.0/infrareds/{infrared_id}/matching-remotes/token

Request parameter

Parameter name Type IN Required Description
infrared_id String uri true The device ID.

Description of body

Parameter name Type IN Required Description
category_id Integer false The ID of a specified category.
pre_token String false The token of the last match.
key_id Integer false The key ID.
code String false The learning code.

Return parameter

Parameter name Type Description
result SmartMatchTokenResultVO The returned result.

Description of result

Parameter name Type Description
token String The token of smart matching.
expire_time Integer The time when the token expires.

Request example

POST: /v2.0/infrareds/vdevo15345926009****/matching-remotes/token
{ "category_id": 1, "code": "c42230112602f401260226022602260226022602260226022602260226027206260226022602720626027206260272062602720626027206260272065802f401260272062602260226027206260226022602260226024006260226022602260226022602260272062602260226027206260272062602260258024006260272062602720626024c9af622660826022***", "keyId": 1, "preToken": "1e25s2xc5a2ddazg" }

Return example

{ "result": { "expire_time": 600, "token": "6f560886f68097eda8dc10dc346****" }, "t": 1631102049160, "success": true }

Error code

For more information, see error code.