getPublicKey (v1.0)

Estimated reading time: 1 minute

This API requests the device to provide an RSA public key for encryption. For details on encryption specifications, please see Data Encryption.

Syntax

http://<Base URL>/encryption

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example
{
    "method": "getPublicKey",
    "id": 1,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).
name type multiplicity default description
publicKey string 1 RSA public key.
JSON Example
{
    "result": [{"publicKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEA3p6TmGYDRtnnmzckD5leg7lHIUY9cuV6vFvacew1uZ7Bmx2MF9a7SqmtiLDkLS3P9y9eobRjuWriSfgmqDPRFRU2mdwAmRm2aIvYa6WkzvnrfUhGR+SCT/Z62j7V9ps6Mt5HB8mFQj3494p4StTPVS1nFqvEUazEx13EJnJyHsdYqsV6UJV169e43oLSSccb3lr8BzeMUnGEfY+NKlAxDpEycr5jJYyTkLfrbX0lyAPs+vLwLRYhm+h2qJYAZUwknus4vD7aki4G69S+gnENClglh/e9ut9Q5BrtxiBQCEikn9V9rlnVkbp1eEUf89XFiHRWMVrRAINtJyQFvvoPOQ=="}],
    "id": 1
}
Error Code
The following error codes are important for this API. Refer to error code for other errors.
code Explanation
42400 Key does not exist yet.
Last modified: 6 Feb 2019