node-blink-security
node-blink-security copied to clipboard
camera clip URL isn't valid.
I tried to fetch the clip URL and I get this JSON response back from the blink servers:
{"message":"Media not found","code":700}
So I'm assuming the clip URL we have isn't the correct one that blink actually uses for the video clip. How are you reverse engineering what the blink app does?
Can you show me the code you used?
Maybe they've changed something else along with auth endpoints. Can you fetch thumbnail
?
So I also tried to grab the getVideos url at '/api/v2/videos'
and that returns
{ message: 'An app update is required' }
Here's some sample code I was using
const Blink = require('node-blink-security');
const request = require("request");
const blink = new Blink(
"XXXXXXX",
"xXXXXXX",
"BlinkCameras",
{
auth_2FA: false
}
);
(async () => {
try {
await blink.setupSystem();
const cameras = await blink.getCameras();
blink.getLinks();
const cam = cameras["1090611"];
request(
{
url: cam.clip,
headers: blink._auth_header,
json: true
},
(err, response, body) => {
console.log(body);
}
);
request({
url: blink.urls.base_url + '/api/v2/videos',
headers: blink._auth_header,
json:true
}, (err, response, body) => {
console.log(body);
})
}
catch (e) {
console.error(e);
}
})();
So it seems they've changed a lot of the default URLs.
BTW the thumbnail
url works.
What are you trying to achieve? Do you want to record video from your camera or access a previously recorded clip?
Try using blink.getVideos()
with the latest version - 4.1.4
Thanks, hopefully I'll have a chance to try this this week sometime.