1
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: June 11, 2019, 12:02:16 PM »
Hello,
I have worked out how to include authorization from the username and password defined within the Simple Web Server. The following refers to step
Perform the following AFTER you have pasted rablack97's code in the Lambda Function.
Firstly, just before the
Secondly, go to this line which is around line ~90:
Now it should work, hope this helps.
Let me know if I have done something incorrect or not suitable for VoxCommando.
I have worked out how to include authorization from the username and password defined within the Simple Web Server. The following refers to step
Quote
39. Delete everything from the codebox and paste in the following code:
Perform the following AFTER you have pasted rablack97's code in the Lambda Function.
Firstly, just before the
Code: [Select]
exports.handler = function (event, context{
line declare two new variables:Code: [Select]
var username = 'yourUsername';
var password = 'yourPassword';
which must match the username and password you used for the Simple Web Server. Secondly, go to this line which is around line ~90:
Code: [Select]
var get_options = {
host: VC_ip,
port: VC_Port,
path: VC_uri
};
On this you want to add a new attribute called headers which will pass the username and password when sending the http request, like so:Code: [Select]
var get_options = {
host: VC_ip,
port: VC_Port,
path: VC_uri,
headers: {
'Authorization': 'Basic ' + new Buffer(yourUsername + ':' + yourPassword).toString('base64')
}
};
Now it should work, hope this helps.
Let me know if I have done something incorrect or not suitable for VoxCommando.