coap.psk.create

The coap.psk.create command is used to create a DTLS pre-shared key.

TR50 Request

{
  "1": {
    "command": "coap.psk.create",
    "params": {
      "name": "My New PSK",
      "desc": "My New PSK",
      "identity": "PSK1",
      "psk": "858b3af594159a06544b5143"
    }
  }
} 

Request Parameters

Name Type Required Description
name String Yes The name to be assigned to the pre-shared key.
desc String A textual description of the pre-shared key.
identity String Yes A textual identifier of the pre-shared key.
psk String The pre-shared key. The PSK must contain atleast 16 hexadecimal characters. The PSK is auto-generated, if the field is omitted.

The PSK (pre-shared key) must be unique across all the organizations in your deviceWISE Cloud.

TR50 Response

If the command is sent successfully a success message, the id, and the pre-shared key value is returned. Otherwise, an error and error message will be returned.

{
  "1": {
    "success": true,
    "params": {
      "id": "59a06544b5143858b3af5941"
    }
  }
}

Response Parameters

Name Type Description
id String The id of the newly created pre-shared key