Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call get_hydrofabric without a ScienceBase account? #27

Open
lucyrandrews opened this issue Oct 2, 2023 · 0 comments
Open

Call get_hydrofabric without a ScienceBase account? #27

lucyrandrews opened this issue Oct 2, 2023 · 0 comments

Comments

@lucyrandrews
Copy link

For the function get_hydrofabric, would it be possible to call sbtools download functions or download functions from other packages that don't require a user to authenticate with a ScienceBase account?

get_hydrofabric calls sbtools::item_file_download, which requires authentication and session validation. As someone who doesn't work for DOI or have a close USGS collaborator, I don't have a ScienceBase account, so I can't use get_hydrofabric to download hydrofabric objects. There are certainly ways to work around this as a user (e.g. customizing functions as a user or just downloading directly from a ScienceBase link), but I just thought I'd toss this out there as a suggestion in case others are running into this!

What I see on my end:

hydrofab::get_hydrofabric(VPU = "18", type = "reference", dir = here("data-raw"), overwrite = TRUE)

retrieving S3 URL
Error in value[[3L]](cond) : 
  Error downloading [my filepath] Original error: 
 Error in get_access_token(): no token found, must call authenticate_sb()

sbtools::authenticate_sb()

Please enter your username:
Error in sbtools::authenticate_sb() : Empty username supplied, stopping

Thanks for considering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant