dg_pat_ key works with the real data of your spaces. Here’s how
to build an integration on your computer without breaking anything.
A key for development
- Create a separate key just for development and keep it in the
DEGROSHI_API_KEYenvironment variable, not in the code. The SDKs read that variable themselves. - While you write reads, give the key “Read only” access: it can’t change anything.
- Try writes in the sandbox with a
dg_test_key: nothing there matters, andPOST /v1/sandbox/resetbefore each test run brings the starting data back. - When you’re done, revoke the key: Revoke a key.
Webhooks to your computer
A webhook goes only to a public HTTPS address, not to a server running on your computer. A tunnel gives that server a public address. For example, ngrok for a server on port 3000 (Cloudflare Tunnel works the same way):"test": true and shows up on
the “Deliveries” tab marked “Test”.
A free tunnel’s address may change every time it starts: update it with “Edit” next to the URL on the webhook’s page, or
use a tunnel with a fixed address.
Checking the signature
CheckDegroshi-Signature on your computer too, with the same dg_whsec_… secret: then your handler behaves the same on
the server. How: Checking the signature.
Repeat an event
- “Send again” on the “Deliveries” tab sends the same event again: handy while you fix your handler.
GET /v1/eventsreturns the last 30 days of events in the same shape as the webhook. You can save them and use them as examples in your tests. What each event looks like is in the API reference, under “Webhooks”.