igord/sendy-api

Error: API key not passed

Opened this issue · 0 comments

I am getting error when i try to use this Node Dependency.

const Sendy = require('sendy-api');
const sendy = new Sendy('http://se01.ind.com/', 'pbI');
export const subscribeNewUser = functions.https.onRequest((req, res) => {
    // @ts-ignore
    /* tslint:disable:no-empty */
    corsHandler(req, res, async() => {
        sendy.subscribe({email: req.query.email, list_id: "5j"}, function(err, result) {
            if (err) console.log(err.toString());
            else console.log('Success: ' + result); res.send({status: 'ok'});
        });
    });
})

Image of Error
Screenshot_8
: