The notices
Give an app key an address
Notices go to one address per app key. Only an admin sets it, and only on an app key that is switched on. Agent keys don’t get notices.- Go to Build → Notices to apps. Or open the app key: its side panel has a Notices part.
- Next to the app key, select Add address and enter your server’s address. It must start with
https://and be on a public network. - Select Save address, then copy the signing value, which starts
bcn_ntc_. Beacon shows it once. Your app uses it to check that each notice came from Beacon.
See each delivery
Under Deliveries on the Notices card, each notice shows the app key, when it happened, its status, the next try and how many tries so far. Select a notice to see every try.What a notice holds
Beacon sends aPOST with a JSON body. The body holds exactly these fields:
There is no figure, name or amount in a notice. What your app may read is decided at the re-read, by the key’s access, and that read is recorded.
Each request also carries
Beacon-Signature and Beacon-Notice-Id headers.
Check the signature
Beacon-Signature reads t=<unix seconds>,v1=<signature>. The signature is an HMAC-SHA256, in hex, of <t>.<raw body>, keyed with your signing value. Check it against the raw body, before parsing, and refuse a notice signed more than five minutes ago.
Answer, and how Beacon tries again
Answer with any2xx status within 10 seconds. Beacon doesn’t read your reply and doesn’t follow redirects.
Any other answer, or none, and Beacon tries again, with growing gaps: up to 8 tries in all, at about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours after the first. Beacon checks for tries due every 5 minutes, so on Beacon Demo the first tries again came about 5, 10 and 30 minutes after the first. After the last try Beacon marks the delivery failed. Nothing is lost: ask what changed since read_changes_since and your app catches up.
Switching the key off, stopping notices or changing the address stops the tries still waiting. Beacon stops at the next try that is due, and the delivery shows Stopped.
Example
A notice received on Beacon Demo. The notice ID is shortened here.Related
Keep a dashboard current
Ask what changed since, then re-read only that.
Build an app on the Data API
Sign in with a key, read and page.
App keys
Make a key and switch it off.