Manage credentials

It is likely that you will need to provide a set of test credentials to fully test your package.

In that case you can use httr2 which offers substantial support for secret management.

usethis::edit_r_environ()

Then you can add your key to your user-level .Renviron file.

YOURPACKAGE_KEY=key_you_generated_with_secret_make_key

Now you can restart R

rstudioapi::restartSession()

You also can add your key to your workflows.

    env:
      YOURPACKAGE_KEY: ${{ secrets.YOURPACKAGE_KEY }}