Change Device Key
Description
Update key for an already existing device.
Request
PUT /v1/domains/:domain/keys/devices/:deviceId
{
preSharedKey: string
}
Response
Successful response contains the following JSON formated body:
{
deviceId: string,
preSharedKey: string
}
Response Status codes:
- 200 on success
Request headers
This request must have the following headers:
Authorization: bearer <ApiKey>
X-Nabto-Organization: <organizationId>
Content-Type: application/json
Example
Request
curl -XPUT "https://api.cloud.nabto.com/v1/domains/:domain/keys/devices/:deviceId" \
-H "Authorization: Bearer <ApiKey>" \
-H "X-Nabto-Organization: <OrganizationId>" \
-H "Content-Type: application/json" \
-d '{ preSharedKey: "01010101010101010101010101010101"}'
Response
{
deviceId: "a.mydomain.example.net",
preSharedKey: "01010101010101010101010101010101"
}