Get General Key Information

Last Updated on : 2023-06-15 05:18:07

During the DIY development of various devices across categories, get some basic key IDs and key values in advance, which will be used when you save the learning code of the remote control.

API address

GET: /v2.0/infrareds/{category_id}/base-key

Request parameter

Parameter nameTypeINRequiredDescription
category_idStringuritrueThe ID of a specified category. For more information, see Get Category List.
langStringquerytrueThe language.
  • zh: Chinese
  • en: English

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
idIntegerThe ID of a specified key.
key_nameStringThe name of a specified key.
keyStringThe key of a specified infrared code. It is used to distinguish the keys when there are multiple learning keys.

Request example

GET: /v2.0/infrareds/1/base-key?lang=zh

Return example

{
    "result": [
        {
            "key_name": "Power supply",
            "id": 1,
            "key": "power"
        },
        {
            "key_name": "OK",
            "id": 42,
            "key": "ok"
        },
        {
            "key_name": "Channel +",
            "id": 43,
            "key": "channel_up"
        },
        {
            "key_name": "Channel -",
            "id": 44,
            "key": "channel_down"
        },
        {
            "key_name": "Menu",
            "id": 45,
            "key": "menu"
        },
        {
            "key_name": "Up",
            "id": 46,
            "key": "navigate_up"
        },
        {
            "key_name": "Down",
            "id": 47,
            "key": "navigate_down"
        },
        {
            "key_name": "Left",
            "id": 48,
            "key": "navigate_left"
        },
        {
            "key_name": "Right",
            "id": 49,
            "key": "navigate_right"
        },
        {
            "key_name": "Volume +",
            "id": 50,
            "key": "volume_up"
        },
        {
            "key_name": "Volume -",
            "id": 51,
            "key": "volume_down"
        },
        {
            "key_name": "0",
            "id": 56,
            "key": "0"
        },
        {
            "key_name": "1",
            "id": 61,
            "key": "1"
        },
        {
            "key_name": "2",
            "id": 66,
            "key": "2"
        },
        {
            "key_name": "3",
            "id": 71,
            "key": "3"
        },
        {
            "key_name": "4",
            "id": 76,
            "key": "4"
        },
        {
            "key_name": "5",
            "id": 81,
            "key": "5"
        },
        {
            "key_name": "6",
            "id": 86,
            "key": "6"
        },
        {
            "key_name": "7",
            "id": 91,
            "key": "7"
        },
        {
            "key_name": "8",
            "id": 96,
            "key": "8"
        },
        {
            "key_name": "9",
            "id": 101,
            "key": "9"
        },
        {
            "key_name": "#",
            "id": 10030,
            "key": "#"
        },
        {
            "key_name": "*",
            "id": 10088,
            "key": "*"
        },
        {
            "key_name": "Homepage",
            "id": 136,
            "key": "homepage"
        }
    ],
    "t": 1666318459532,
    "success": true
}

Error code

For more information, see error code.