Modify Domain Keys

Description

Mydify webhooks, and auth keys for a domain.

  • masterSecret: domain master secret
  • preSharedKey: domain pre shared key
  • firebaseServerKey: firebase key used when sending firebase messages.
  • webhookUrl: Webhook URL for push notifications.
  • webhookUser: Webhook basic auth User name for push notifications.
  • webhookPass: Webhook basic auth password for push notifications.
  • connectWebhookUrl: Connect Webhook URL for connect validation.
  • connectWebhookUser: Connect Webhook basic auth User name for connect validation.
  • connectWebhookPass: Connect Webhook basic auth password for connect validation.
  • eventWebhookUrl: Event Webhook URL for event notifications.
  • eventWebhookUser: Event Webhook basic auth User name for event notifications.
  • eventWebhookPass: Event Webhook basic auth password for event notifications.
  • allowSelfSigned: Allow clients with self signed certificates to connect to devices.

Request

POST /v1/domains/:domain/keys
{
  masterSecret?: string|null,
  preSharedKey?: string|null,
  firebaseServerKey?: string|null,
  webhookUrl?: string|null,
  webhookUser?: string|null,
  webhookPass?: string|null,
  connectWebhookUrl?: string|null,
  connectWebhookUser?: string|null,
  connectWebhookPass?: string|null,
  eventWebhookUrl?: string|null,
  eventWebhookUser?: string|null,
  eventWebhookPass?: string|null,
  allowSelfSigned?: boolean
}

Response

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 -XPOST "https://api.cloud.nabto.com/v1/domains/:domain/keys" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>" \
  -H "Content-Type: application/json" \
  -d '{ masterSecret: "<masterSecret>", preSharedKey: "01010101010101010101010101010101", firebaseServerKey: "<firebaseServerKey>", webhookUrl: "<webhookUrl>", webhookUser: "<webhookUser>", webhookPass: "<webhookPass>", connectWebhookUrl: "<connectWebhookUrl>", connectWebhookUser: "<connectWebhookUser>", connectWebhookPass: "<connectWebhookPass>", eventWebhookUrl: "<eventWebhookUrl>", eventWebhookUser: "<eventWebhookUser>", eventWebhookPass: "<eventWebhookPass>", allowSelfSigned: true}'

Response

Returns response Code: 200