Problem encountered with occ_download()

Hi everyone,

I’m new to the package rgbif, and after reading how it functions I decided to make a query. I was looking to download some occurrence data of common dolphin in an specific area. This is the code used:

GBIF_USER=“diegoferfer”
GBIF_PWD=“************”
GBIF_EMAIL= “*****gmail.com

shape ← read_sf(“NEW_study_area.shp”)
shape ← st_transform(shape, crs = 4326)
shape_wkt ← st_as_text(st_union(shape))
taxonKey ← name_backbone(name = “Delphinus delphis”)$usageKey
occ_download(
pred_and(pred(“taxonKey”, 8324617), pred_within(shape_wkt)))

Error: 401 - Unauthorized

I tried also this code:

occ_download(
pred_and(pred(“taxonKey”, 8324617), pred_within(simplified_wkt)),
user = “diegoferfer”,
pwd = “**********”,
email = “******gmail.com
)

I just keep getting this same error message. Am I missing something?

Thanks in advance!
Diego.

Hi, did someone ever get back to you? It’s probably going to get more attention on Github