I have a new install with the API enabled. I used the sample curl command (with the missing space before the --data) and it worked.
I have a php script that I have used on a previous install to do a test session create. When I run it on the same account as the new install I get a 401 error.
If I run the exact same script on another account connecting to the new install, with the same hosting company, it runs fine.
So I don’t believe that there is a phplist API problem. But I can’t figure out why I am getting the 401 error when I run it on the same account as new install. I can’t figure out how to get any logs that might tell me why I get the 401. I have tried turning on debug per the troubleshooting and API troubleshooting pages but nothing is ever generated. Any suggestions about how to debug this would be appreciated.
On the F account, I can run the curl commands to both installations and they both work fine. When I go to the J account, the curl command to its installation works fine but when I run it against the F installation it returns HTML.
I am struggling to know where to even start troubleshooting this.
I did a clean install on the “J” account and everything works fine. Deleted everything off of the “F” account and did a clean install. The command line curl works, as before. The PHP program is failing with the 401 error. The same PHP program works fine on the “J” account with just the url, and password changed.
I turned on API logging per the instructions but even after I rerun the test program there is nothing in the error_log. The API troubleshooting page doesn’t say where the output will go.