Skip to content

Commit

Permalink
replace Personal Access Token to API
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed Jan 5, 2025
1 parent 6bad328 commit fcfe180
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions R/wf_set_key.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ wf_set_key <- function(key, user = "ecmwfr") {
)
}
browseURL(wf_key_page(service))
message("Login or register to get a Personal Access Token")
key <- getPass::getPass(msg = "Personal Access Token: ")
message("Login or register to get a API Token")
key <- getPass::getPass(msg = "API Token: ")
if (is.null(key))
stop("No key supplied.")
}
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ to the ECMWF using [the public forum](https://forum.ecmwf.int/t/changes-to-grib-
Create a ECMWF account by [self
registering](https://www.ecmwf.int/user/login). Once your user account has been verified you can get your API token (or `key` in `ecmwfr`) by visiting one of the Data Stores user profiles, for example the CDS [user profile](https://cds.climate.copernicus.eu/profile).

The Personal Access Token is a long string of letters and numbers:
The API Token is a [UUID](https://fr.wikipedia.org/wiki/Universally_unique_identifier) and should look something like:

``` json
Personal Access Token: abcd1234-foo-bar-98765431-XXXXXXXXXX
```
This Personal Access Token gives you access to all Data Store services, including the climate atmosphere and emergency management services. This information is required to be able to retrieve data via the `ecmwfr` package. Use the
API: abcd1234-foo-bar-98765431-XXXXXXXXXX
```

This API Token gives you access to all Data Store services, including the climate atmosphere and emergency management services. This information is required to be able to retrieve data via the `ecmwfr` package. Use the
`ecmwfr` [`wf_set_key`](references/wf_set_key.html) function to store
your login information in the system keyring (see below).

Expand Down
2 changes: 1 addition & 1 deletion vignettes/advanced_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ accept `date = "2000-01-01/to/2000-12-31"` specifications at the moment. It is p

## Environmental variables

Alternatively, you can set an environmental variable containing your Personal Access Token.
Alternatively, you can set an environmental variable containing your API.

```{r eval=FALSE}
Sys.setenv(ecmwfr_PAT="abcd1234-foo-bar-98765431-XXXXXXXXXX")
Expand Down

0 comments on commit fcfe180

Please sign in to comment.