[FIX] Disable API calls if not enabled

Fixes #2293