You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are struggling with receiving messages using node (v10) and the library. We get error "Signature is invalid and does not match the payload" here is the code example which we are using:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
const telnyx = require('telnyx')('API key');
exports.receiveSMSTelnyx = functions.https.onRequest((request, response) => {
var event;
try {
// Try adding the Event as request.event
event = telnyx.webhooks.constructEvent(
request.rawBody,
request.headers['telnyx-signature'],
request.headers['telnyx-timestamp'],
'public key'
);
} catch (e) {
// If constructEvent throws an error, respond with the message and return.
console.log('Error', e.message);
Hello,
We are struggling with receiving messages using node (v10) and the library. We get error "Signature is invalid and does not match the payload" here is the code example which we are using:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
const telnyx = require('telnyx')('API key');
exports.receiveSMSTelnyx = functions.https.onRequest((request, response) => {
var event;
try {
// Try adding the Event as
request.event
event = telnyx.webhooks.constructEvent(
request.rawBody,
request.headers['telnyx-signature'],
request.headers['telnyx-timestamp'],
'public key'
);
} catch (e) {
// If
constructEvent
throws an error, respond with the message and return.console.log('Error', e.message);
});
The text was updated successfully, but these errors were encountered: