voucherifyio / voucherify-nodejs-sdk

[Deprecated] Node.js SDK for Voucherify - coupons, vouchers, promo codes
http://www.voucherify.io
MIT License
27 stars 16 forks source link

Initialization #115

Closed piano1029 closed 4 years ago

piano1029 commented 4 years ago
/bot.js:126
const voucherifyAPI = voucherifyClient({
                      ^
ReferenceError: voucherifyClient is not defined
    at Object.<anonymous> (/app/bot.js:126:23)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
    at internal/main/run_main_module.js:17:11

Why do i get this error? My code:

const voucherify = require('voucherify') // This is the first bit
const voucherifyClient = voucherifyClient({ // This is when my bot is connected to the services it needs
  applicationId: 'd8bf21ff-c110-400a-8766-ba82540054fa',
  clientSecretKey: 'ce27f1ea-9cef-48e8-9952-274ce7c0eca3'
})