api icon indicating copy to clipboard operation
api copied to clipboard

I cannot make my API key work in RStudio

Open rasundsbak opened this issue 6 months ago • 2 comments

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

rasundsbak avatar Jun 16 '25 15:06 rasundsbak

delete

sscornelius avatar Jun 16 '25 18:06 sscornelius

@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

jonquandt avatar Jun 16 '25 19:06 jonquandt