skill-sample-node-device-address-api
skill-sample-node-device-address-api copied to clipboard
Cannot read property 'consentToken' of undefined
It gives below error. Even after enabling permissions for full address.
"errorMessage": "Cannot read property 'consentToken' of undefined",
"errorType": "TypeError",
"stackTrace": [
"Object.getAddressHandler (/var/task/Handlers.js:59:68)",
"emitNone (events.js:86:13)",
"AlexaRequestEmitter.emit (events.js:185:7)",
"AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:216:10)",
"AlexaRequestEmitter.ValidateRequest (/var/task/node_modules/alexa-sdk/lib/alexa.js:181:23)",
"AlexaRequestEmitter.HandleLambdaEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:126:25)",
"AlexaRequestEmitter.value (/var/task/node_modules/alexa-sdk/lib/alexa.js:100:31)",
"exports.handler (/var/task/index.js:21:11)"
]
I have tried below values but got 403
const deviceId = this.event.context.System.device.deviceId;
const endPoint = this.event.context.System.apiEndpoint;
const token = this.event.context.System.apiAccessToken;
You need to grant this permission in the user's app
Obviously I have enabled it!
I was only trying to help. There are multiple places where you need to ensure permissions. I'm sorry I tried. Have a good day.