Authentication
All endpoints requires an X-Pouch-Api-Key
header. An additional signature header X-Pouch-Signature
is required for some endpoints, it is generated using HMAC-SHA256, a secret and the request body in a JSON-stringyfied form.
You can generate API keys and secrets in the Pouch Build Dashboard once you have an access (coming soon)
To generate the signature:
const crypto = require('crypto')
const sign = (body, secret) => {
const hmac = crypto.createHmac('sha256', secret)
return hmac.update(JSON.stringify(body)).digest('hex')
}
// hash: 888bb3c0b398422bcda0f612857f7da7fa5c70ca390c0b20c7853214dc06866
Last updated