kvk_set_api_key: Set KvK API Key for the current session

View source: R/kvk_API.R

kvk_set_api_keyR Documentation

Set KvK API Key for the current session

Description

This function sets the specified KvK API key for the current R session using Sys.setenv(). The key will be available until the session ends.

Usage

kvk_set_api_key(api_key)

Arguments

api_key

A string containing the API key.

Details

The function sets the API key using Sys.setenv(), making it available for the current session only.

To store your API key permanently across R sessions, add the following line to your .Renviron file:

KVK_API_KEY=l7xxYourActualApiKeyHere1234567890abcdef

You can edit your .Renviron file by running: usethis::edit_r_environ()

After adding the key, restart R for the changes to take effect.

Value

Invisibly returns TRUE if the key was set.

Examples


# Set the API key for the current session
kvk_set_api_key("abcd1234")

# To store permanently, add this line to .Renviron:
# KVK_API_KEY=your_actual_api_key_here


kvkapiR documentation built on June 25, 2025, 5:11 p.m.