unityfire/alexa-ha

Unable to find userId for configuration

Closed this issue · 1 comments

Index.js code needs refactored to allow the user to find their userId.

userId: A string that represents a unique identifier for the user who made the request. The length of this identifier can vary, but is never more than 255 characters. The userId is automatically generated when a user enables the skill in the Alexa app. Note that disabling and re-enabling a skill generates a new identifier. Type: string.

An immediate workaround is to modify Alexa-HA index.js, line ~48, and comment out this block.

if (request.sessionDetails.userId != config.userId) {
    response.fail("Invalid user ID");
    console.log('Invalid userId: ' + config.userId );
}

You will still be well protected by the applicationId check, which is custom to your ASK App!

Fixed and documented with the latest Pull Request.
#6