It might be a problem with the command you are running. Do you have any other api scripts installed that you could test after the sandbox restart? If something basic works, like !token-mod --help (if you have TokenMod installed), then you will know something about the other script or the command you are running is causing problems.