If an API request failed, the success variable will be set to 0, and errormsg will contain a description why the request failed.
If a request was successful, success is set to 1.
Example of an error