node-blink-security icon indicating copy to clipboard operation
node-blink-security copied to clipboard

camera clip URL isn't valid.

Open bartdorsey opened this issue 4 years ago • 7 comments

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?

bartdorsey avatar May 15 '20 18:05 bartdorsey

Can you show me the code you used?

madshall avatar May 15 '20 19:05 madshall

Maybe they've changed something else along with auth endpoints. Can you fetch thumbnail?

madshall avatar May 15 '20 20:05 madshall

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.

bartdorsey avatar May 15 '20 23:05 bartdorsey

BTW the thumbnail url works.

bartdorsey avatar May 16 '20 00:05 bartdorsey

What are you trying to achieve? Do you want to record video from your camera or access a previously recorded clip?

madshall avatar May 16 '20 00:05 madshall

Try using blink.getVideos() with the latest version - 4.1.4

madshall avatar May 16 '20 01:05 madshall

Thanks, hopefully I'll have a chance to try this this week sometime.

bartdorsey avatar May 19 '20 14:05 bartdorsey