@dennis
at server side with node.js with this call:
var poynt = require(‘poynt’)({
region: ‘eu’,
applicationId: ‘urn:aid:b25e3e3a-dec2-41a1-baaa-2e91bf440f0a’,
filename: __dirname + ‘/testprizeme.pem’
})
poynt.createHook({
businessId: ‘8eb8c2c9-0087-4cb4-aafd-ccbeff9c8e72’,
eventTypes: [‘APPLICATION_SUBSCRIPTION_START’, ‘APPLICATION_SUBSCRIPTION_END’, ‘APPLICATION_SUBSCRIPTION_PAYMENT_SUCCESS’, ‘APPLICATION_SUBSCRIPTION_PAYMENT_FAIL’, ‘APPLICATION_SUBSCRIPTION_PHASE_CHANGE’, ‘APPLICATION_SUBSCRIPTION_REFUND_SUCCESS’],
deliveryUrl: ‘http://mywebsite’,
secret: ‘poynt123’
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
we receive follow error:
developerMessage = "The principal does not have read access to the resource: /applications"The principal does not have read access to the resource: /applications
Error: Access not authorized for the requested resource.
at Object.error (C:\Users\agnap\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\node_modules\poynt\lib\helpers.js:39:11)
at Request._callback (C:\Users\agnap\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\node_modules\poynt\lib\helpers.js:249:25)
at Request.self.callback (C:\Users\agnap\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\node_modules\request\request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\Users\agnap\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\node_modules\request\request.js:1157:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\Users\agnap\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\node_modules\request\request.js:1079:12)
at Object.onceWrapper (events.js:313:30)
any solution for this?
thanks