I cannot make my API key work in RStudio
Set API-key
options(govinfoR.api_key = 'my_api_key')
Checks if it works:
if (has_govinfo_key()) { print("API-key is set") } else { print("No API key is set.") }
...and i keep getting the wrong answer. I use packages: library(govinfoR) library(dplyr) library(httr2) library(conflicted)
Best wishes from Ragnhild Librarian and political scientist
delete
@rasundsbak - The GovInfo team did not build the R-Studio package that you are referring to, so we are unable to provide any specific support on it.
Are you able to successfully perform requests to the API via curl or using our interactive documentation using your key?
Just glancing at the R package documentation, are you setting the API Key as follows: https://rdrr.io/cran/govinfoR/man/set_govinfo_key.html