import Avido from 'avido';
const client = new Avido({
apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});
const response = await client.validateWebhook.validate({
body: {
applicationId: '456e7890-e89b-12d3-a456-426614174000',
prompt: 'I lost my card, please block it.',
testId: '123e4567-e89b-12d3-a456-426614174000',
},
signature: 'abc123signature',
timestamp: '2024-01-01T00:00:00.000Z',
});
console.log(response.valid);{
"valid": true
}Checks the body (including timestamp and signature) against the configured webhook secret. Returns { valid: true } if the signature is valid.
import Avido from 'avido';
const client = new Avido({
apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});
const response = await client.validateWebhook.validate({
body: {
applicationId: '456e7890-e89b-12d3-a456-426614174000',
prompt: 'I lost my card, please block it.',
testId: '123e4567-e89b-12d3-a456-426614174000',
},
signature: 'abc123signature',
timestamp: '2024-01-01T00:00:00.000Z',
});
console.log(response.valid);{
"valid": true
}Your unique Avido API key
Your unique Avido Application ID
Raw JSON payload sent by an external webhook, including signature and timestamp. HMAC verification is used for security.
HMAC signature for the request body.
"abc123signature"
Timestamp for the request. Accepts unix milliseconds (string/number) and ISO date strings.
"2024-01-01T00:00:00.000Z"
The payload received from Avido. Use this in signature verification.
Show child attributes
Webhook is valid
Response object indicating whether the webhook was valid.
Indicates if the webhook payload was successfully validated.
true