How to AUTH when accessing the PiHole API from python

There's a few ways you can authenticate:

  1. Include your password in the pw variable when POSTing
  2. Pass the WEBPASSWORD hash found in /etc/pihole/setupVars.conf in the auth GET variable

If you keep a session, you will continue to be authenticated for up to 30min since your last API call. We are working to improve the security and usability of the API, so stay tuned for upcoming changes!