Generating your token
Source:vignettes/articles/Generating-your-token.Rmd
Generating-your-token.Rmd
To be able to use the package you’ll need a CLIENT_ID
and CLIENT_SECRET
from the WHO website. Follow these
instructions to obtain it:
- Go to the WHO ICD API website at https://icd.who.int/icdapi and
click on
Register
inside theAPI Access
section:
- Fill out your information and verify your email.
- Once your email is verified go to the
Login
page. Enter your email and password:
- Read and accept the terms and conditions for the API
- Under API Access click on
View API access key(s)
- Your client id and secret will be required by the
WHOicd
library. Copy them, they are the equivalent to a user and password for this API. You’ll need them to interact with the WHO ICD. Don’t share them!!
- Now go back to R and use them!
library(WHOicd)
#Substitute for your ID and SECRET
token <- get_token(CLIENT_ID, CLIENT_SECRET)
#Check that they work by searching all ICD-10 releases
icd10_releases(token)
#> [1] "2019" "2016" "2010" "2008"