walkerke / mapboxapi

R interface to Mapbox web services
https://walker-data.com/mapboxapi/
Other
109 stars 8 forks source link

Token Cannot Be Recognised #30

Closed tmasjc closed 2 years ago

tmasjc commented 2 years ago

I was being prompted by the following error,

Error: Your supplied token appears to be invalid. Token strings will begin with 'pk.ey'. Retrieve one or create one from your Mapbox account.

The function is a simple one,

mapboxapi::list_styles(
    username     = Sys.getenv("mapbox.username"),
    access_token = get_mb_access_token(default = "MAPBOX_SECRET_TOKEN", secret_required = TRUE)
)

I checked the token returned by get_mb_access_token and it was correct. I tried to fetch manually via curl and it also works.

Is there anyway I can help to debug this?

walkerke commented 2 years ago

What version of the package are you using? I thought I fixed this earlier this summer.