node-virustotal icon indicating copy to clipboard operation
node-virustotal copied to clipboard

rescanFile promise error / v2 deprecated?

Open jplandry908 opened this issue 5 years ago • 3 comments

It appears the .rescanFile method is no longer valid and reporting Promise errors.

Testing this in powershell, this now fails (it use to work last week) ...

    $u = 'https://www.virustotal.com/vtapi/v2/file/rescan'
    $method = 'POST'
    $body = @{ resource = $hash; apikey = $VTApiKey}
    Invoke-RestMethod -Method $method -Uri $u -Body $body

However, this works ...

    $u = 'https://www.virustotal.com/api/v3/files/' + $hash + '/analyse'
    $method = 'POST'
    $header = @{ "x-apikey" = $VTApiKey }
    Invoke-RestMethod -Method $method -Uri $u -Headers $header

It looks like VirusTotal is beginning to deprecate the v2 API calls and everything will need to be swapped to v3.

jplandry908 avatar Nov 20 '19 13:11 jplandry908

I'll start working on it as soon as I have time.

natewatson999 avatar Nov 28 '19 21:11 natewatson999

Just a status update: There have been a series of updates to deal with the massive V3 API change. There are more coming due to how large the API has grown.

natewatson999 avatar Dec 26 '19 21:12 natewatson999

Thanks for the update. I hope you had a Merry Christmas and a Happy New Year.

jplandry908 avatar Dec 26 '19 21:12 jplandry908