Skip to Content
🎉 Welcome to the new MyOwnFreeHost API Documentation!
Errors

Errors

The MyOwnFreeHost API doesn’t use any error codes, and will always return a 200 OK HTTP code.

Always read the response body to know if a request was successful or not.

This page goes over the errors you could encounter when using the MyOwnFreeHost API.

General errors

IP not in allowed IPs

When the request IP is not in the allowed IPs, one of two errors may be returned:

{ "cpanelresult": { "apiversion": "2", "error": "The API username you are using appears to be invalid 1. 0The API username you are using appears to be invalid 2. The API key you are using appears to be invalid 1. . The API key you are using appears to be invalid 2. . ", "data": { "reason": "The API username you are using appears to be invalid 1. 0The API username you are using appears to be invalid 2. The API key you are using appears to be invalid 1. . The API key you are using appears to be invalid 2. . ", "result": "0" }, "type": "text" } }

or

{ "cpanelresult": { "apiversion": "2", "error": "The API ip address calling (1.1.1.1) does not match the allowed ip address. Please log into your reseller panel and ensure that your server ip address is listed in the 'allowed ip address' option of the api section. . The API ip address calling (1.1.1.1) does not match the allowed ip address. Please log into your reseller panel and ensure that your server ip address is listed in the 'allowed ip address' option of the api section. . ", "data": { "reason": "The API ip address calling (1.1.1.1) does not match the allowed ip address. Please log into your reseller panel and ensure that your server ip address is listed in the 'allowed ip address' option of the api section. . The API ip address calling (1.1.1.1) does not match the allowed ip address. Please log into your reseller panel and ensure that your server ip address is listed in the 'allowed ip address' option of the api section. . ", "result": "0" }, "type": "text" } }

Invalid API key

When an invalid API key is supplied, the following error is returned:

{ "cpanelresult": { "apiversion": "2", "error": "The API key you are using appears to be invalid 1. . ", "data": { "reason": "The API key you are using appears to be invalid 1. . ", "result": "0" }, "type": "text" } }

Endpoints

Here is a list of errors you could receive when using the MyOwnFreeHost API, sorted by endpoint type:

Information (/information/...)

There is no good way to detect errors. You probably don’t ever need to make calls to these endpoints on a production/live environment anyways.

Accounts (/accounts/...)

Take a look inside . Check if the result is 1 (don’t use strict comparison, or cast to int first).

If status is not 1, the error can (usually) be found in .

Domains (/domains/...)

These are all different. See the specific endpoint’s page for additional information on what each one returns.

Tickets (/tickets/...)

Ticket Creation

Check the returned string to see if it contains SUCCESS :.

If it does, the ticket creation was successful. If it does not, the request failed and the string contains the error message.

Ticket Reply

Check to see if the returned string is exactly SUCCESS (be sure to use PHP’s trim(), Python’s .strip(), etc. first).

If the string is not exactly SUCCESS, the request failed and the string contains the error.

Last updated on