set_key: Set VirusTotal API Key

View source: R/set_key.R

set_keyR Documentation

Set VirusTotal API Key

Description

Stores your VirusTotal API key in an environment variable for use by other package functions. Get your API key from https://www.virustotal.com/.

Usage

set_key(api_key = NULL)

Arguments

api_key

VirusTotal API key (character string). Required.

Details

The canonical environment variable is VIRUSTOTAL_API_KEY; the historical VirustotalToken is also set for compatibility with code that reads it directly. Setting either variable before loading the package works without calling this function at all.

Value

Invisibly returns TRUE on success

References

https://docs.virustotal.com/reference

See Also

Other authentication: has_vt_key(), vt_key()

Examples

## Not run: 
# Set your API key
set_key('your_64_character_api_key_here')

# Verify it's set
Sys.getenv("VIRUSTOTAL_API_KEY")

## End(Not run)

virustotal documentation built on Aug. 20, 2026, 5:07 p.m.