Obtains an access token for the World Health Organization's (WHO) International
Classification of Diseases (ICD) API available at
https://icd.who.int/icdapi.
Usage
get_token(client_id, client_secret)
Arguments
- client_id
(character
) The client ID as provided by the WHO website (see Generating credentials).
- client_secret
(character
) The client secret key as provided by the WHO API website (see Generating credentials).
Value
Access token for the WHO API. Don't share this token!!
Generating credentials
Go to the World Health Organization API website
https://icd.who.int/icdapi
and Register in the API Access section. Once you have registered and
accepted the terms and conditions click on View API access key(s)
.
You will get a ClientId
and a ClientSecret
. Those strings are the ones
required to use the WHO API.
Examples
#Assuming that the CLIENT ID and CLIENT SECRET are set up. Substitute accordingly
if (exists("CLIENT_ID") & exists("CLIENT_SECRET")) {
token <- get_token(CLIENT_ID, CLIENT_SECRET)
}