Unable to list groups with CiviCRM API
Turns out this was caused by some server settings by my hosting provider (apparently they did some changes to the firewall). They managed to fix it and it seems to be working fine.