ProductId
and DeviceName
to initiate an http/https
request to the platform. The request API and parameters are as detailed below:https://ap-guangzhou.gateway.tencentdevices.com/device/register
http://ap-guangzhou.gateway.tencentdevices.com/device/register
Parameter | Required | Type | Description |
ProductId | Yes | string | Product ID |
DeviceName | Yes | string | Device name |
application/json
format.Parameter | Type | Description |
RequestId | String | Request ID |
Len | Int64 | Length of the returned payload |
Payload | String | Returned device registration information, which is encrypted and needs to be decrypted and processed by the device itself |
productSecret
are taken, and the offset is the character "0" with a length of 16 bits.Key | Value | Description |
encryptionType | 1 | Encryption type. 1: certificate authentication 2: key authentication |
psk | 1239466501 | Device key. This parameter is available when the product authentication type is key authentication. |
clientCert | - | String format of device certificate file. This parameter is available when the product authentication type is certificate authentication. |
clientKey | - | String format of device private key file. This parameter is available when the product authentication type is certificate authentication. |
POST https://ap-guangzhou.gateway.tencentdevices.com/device/registerContent-Type: application/jsonHost: ap-guangzhou.gateway.tencentdevices.comX-TC-Algorithm: HmacSha256X-TC-Timestamp: 1551****65X-TC-Nonce: 5456X-TC-Signature: 2230eefd229f582d8b1b891af7107b91597****07d778ab3738f756258d7652c{"ProductId":"ASJ****GX","DeviceName":"xyz"}
{"Response": {"Len": 53,"Payload": "031T01DWAoqFePDt71VuZXuLzkUzbIhGOnvMzpAFtNgOjagyFNHVSostNl9ztvhOuRx0dMM/DMoWAXQCfL7jyA==","RequestId": "f4da4f1f-d72e-40f1-****-349fc0072ba0"}}
s6FB3a1BA/YYbcmSE12XpeDVmQNDcf1QgVD141RRbmmAnFwQfp1ECAu5O016mCOvYlJJ6V59yM4OqQSiWphfTg==
b3a141ddad4103f6186dc992135d97a5e0d599034371fd508150f5e354516e69809c5c107e9d44080bb93b4d7a9823af625249e95e7dc8ce0ea904a25a985f4e
hzvf5LF9S0isvBhDSauWMaIk
{"encryptionType":2,"psk":"lDZ6Uqt+I9E0wW7rvDUs7Q=="}