Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Warning: Application ID is not set?

I always get the error 'Application ID is not set' in my log files while I have set this ID like they say in this example:

const APP_ID = 'amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';

How can I fix this problem?

like image 204
Jurik Avatar asked Feb 11 '17 18:02

Jurik


People also ask

What is an application ID?

Application IDs are alphanumeric strings passed by an OpenAccess SDK Client that identify the client application to an OpenAccess SDK service that has been configured to accept connections only from specific application IDs.


1 Answers

Problem is that this example is deprecated.

At the botton of your index.js you will find this code:

exports.handler = (event, context) => {
    const alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;
    // To enable string internationalization (i18n) features, set a resources object.
    alexa.resources = languageStrings;
    alexa.registerHandlers(handlers);
    alexa.execute();
};

And alexa.APP_ID = APP_ID; is wrong. They changed it to alexa.appId.

So if you change your line to:

alexa.appId = APP_ID;

You will not get this error message anymore. Here is the documentation.

like image 59
Jurik Avatar answered Oct 03 '22 23:10

Jurik