8
Views
5
Comments
VirusTotal API – Getting 401 Error with Public API Key (v3)
Question
Application Type
Reactive
Service Studio Version
11.55.32 (Build 64283)

Hi All,

I am trying to integrate with VirusTotal API, but I keep receiving a 401 Unauthorized error.

  • I was earlier using the v2 API key, but since it is deprecated, I have switched to the v3 API key.
  • Currently, I am using the public API key.
  • My requests are being made to the v3 endpoints (e.g., https://www.virustotal.com/api/v3/...)
  • But the response is always 401 Unauthorized.

Could you please help me understand if the public API key supports v3 fully, or if there are specific limitations/configurations I need to be aware of?
Has anyone faced a similar issue after migrating from v2 to v3 API key?

Please find the screenshot for the refrence

 

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Mohammad Iqbal Yusuf Sheikh ,

The header for the API key needs to be named x-apikey  . Try changing the name and test again.

Changing the header name itself will cause VirusTotal to reject the request.

2023-10-03 13-56-29
Mohammad Iqbal Yusuf Sheikh

Hi @Mihai Melencu ,

I updated the header to x-apikey and now I’m getting:

Seems like my public API key isn’t being accepted — does this mean the public key is invalid or not supported for v3 endpoints?

2026-01-28 16-57-48
Mihai Melencu
Champion

Your API Key should be supported by the endpoints, even if you don't have the premium plan.

I tested with mine and is working.

2023-10-03 13-56-29
Mohammad Iqbal Yusuf Sheikh

Hi @Mihai Melencu ,

Can you please confirm which VirusTotal API version you are using - v2 or v3?

Would it be possible to share the OML file, so I can cross check my setup?

Thanks a lot for your guidance, it really helped me.

2026-01-28 16-57-48
Mihai Melencu
Champion

I used the v3 endpoints. I created a sample for the Scan URL v3 endpoint (
https://www.virustotal.com/api/v3/urls ). 

Make sure to update the site property for the Api Key when testing.


VirusTotalAPI.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.