Forward Messages

To enable message forwarding over HTTP, update your Meshblu device to contain the following properties:

{
  meshblu: {
    forwarders: {
			sent:     [
        {
      		type: "webhook",
          url: "http://requestb.in/18gkt511",
          method: "POST"
        }
    	]
    }
  }
}

Currently there are four types of messages that can be forwarded: broadcast, config, received, sent.

Forward Meshblu Credentials

Generate a one-time Meshblu token and send it to the webhook. Sent as an HTTP header Authorization: Bearer <base64 encoded string>. The token will only be valid until the recipient of the Webhook responds to the HTTP request.

❗️

Security Warning

The Bearer token will allow the recipient to access and modify your meshblu device. When the request has finished, the token will be removed.

{
  meshblu: {
    forwarders: {
			sent:     [
        {
      		type: "webhook",
          url: "http://requestb.in/18gkt511",
          method: "POST",
          generateAndForwardMeshbluCredentials: true
        }
    	]
    }
  }
}

Signed Requests

To ensure that you are receiving an authorized webhook, you may use the HTTP Signature Scheme. You can verify the request without contacting Meshblu to verify it's authenticity.

{
  meshblu: {
    forwarders: {
			sent:     [
        {
      		type: "webhook",
          url: "http://requestb.in/18gkt511",
          method: "POST",
          signRequest: true
        }
    	]
    }
  }
}