Skip to contents

Setting your credentials

Kenya Health Information System (KHIS) is a comprehensive web-based platform used in Kenya for data collection, management, and analysis in the healthcare sector. However, you need credential to access the data.

khisr cannot make call to KHIS without credential being provided and wrong credential will receive an unauthorized error from KHIS.

Preferred method: Provide the path to the JSON file created

khis_cred(config_path = "/path/to/the/JSON/file.json")

The expected format of the JSON file is

{
  "credentials": {
    "username": "your-khis-username",
    "password": "your-khis-password"
  }
}

Confirm success of credential being set

Alternative

If you cannot access a JSON file you can provide username and password directly

khis_cred(username = 'your_username', password = 'your_password')

To get the username of the logged in users

To clear the password of the logged in users