Hi Matt, thanks a lot for the passthru code, I have been using it for many months already with success. Although recently I received a notice from aws saying "migrate your Node.js v0.10 functions to Node.js v4.3 as soon as possible" or else it will stop functioning in April. Is there anything else I need to do other than configuring the function to use Node.js 4.3 runtime instead? Please kindly advise. Thanks.
Matt - many thanks for this. Using it to make my curtains open and close - https://www.instructables.com/id/Amazon-Echo-Controlled-Curtains/
The web service that I am trying to develop a custom skill for, expects the token in the request header in this format: Authorization: Bearer api_token
Unfortunately, Alexa does not return the accessToken in the above format in the header. Instead, it sends the token in the body as a nested JSON within the user object.
Can a lambda proxy be used as an intermediary between Alexa and my web app to solve this problem?
Alexa would need to send the request to the proxy. The proxy would extract the token from the body and place it in the header in the format "Authorization: Bearer api_token" and send the request to my web app. The web app would respond back to to the proxy, which sends the response to Alexa. Would the above work? If so, can I get a code sample of this lambda proxy?