15.07.2019, 14:34
(This post was last modified: 15.07.2019, 14:34 by gjniewenhuijse.)
(15.07.2019, 13:27)admin Wrote: Send GET request to https://api.cp.dyson.com/v1/provisioning...e/manifest after the first one to get device list. You need to decode the first result using JSON and then pass Accountassword values as Basic auth. See last example in HTTP docs: http://w3.impa.br/~diego/software/luasocket/http.html
i added Account and Password settings to the code below, but i only get a 403 error.
Code:
mime = require("mime")
r, c = https.request {
url = 'https://api.cp.dyson.com/v1/provisioningservice/manifest',
method = 'GET',
headers = { authentication = "Basic " .. mime.b64("xxxxxxxxx:xxxxxxxxxxxx") }
}
log(r,c)