Staff Member

Does the issue persist if you use the same function on it's own with the "API Shell" option in WHM or directly from a browser address bar? This should help determine if it's isolated to your custom script or the API function itself.