dhis2r 0.2.0
In
Dhis2r$new()
now includesapi_token = NULL
for authentication via personal access token optionNew
dhis2_connection$get_any_analytic()
to GET long DHIS2 resources.Functions now print out the resource link being queried
2. Using Personal Access Token (PAT)
Alternatively you can generate a personal access token and use that to connect.
library(dhis2r)
# Replace the value of api_token with the token you have generated
<- Dhis2r$new(base_url = "https://play.im.dhis2.org/stable-2-40-5",
dhis2_play_connection api_token = "d2pat_2EkxmqdxtwAGDGe1hXzpWEixYdvHGRw71587176066")