Callbacks
The MyOwnFreeHost API allows you to set up a callback URL that will be called when a user account gets activated, suspended or unsuspended, or when an SQL cluster gets added to a user. The callback URL is also used for the ticket system
Setup
1. Log in to the MyOwnFreeHost reseller panel
This can be accessed at https://panel.myownfreehost.net/index.php (opens in a new tab) and the page should look something like this:
And then you should be logged in. The dashboard looks something like this:
2. Go to the API setup page
This can be done by clicking on the "API" link in the sidebar, and then clicking on "Setup WHM API". Once you have done that, this is what the page should look like:
Then, select the domain name you want to create the accounts on and click "Get Keys/ Set allow ip address".
3. Add the callback URL
Once you are there, add your callback URL to the "API Callback URL" field. It should look something like this:
In this example, the URL https://example.com/callback
is used.
Then, click on "Update Settings" and everything should be set up!
Hosting Account Callbacks
The following hosting account callbacks are available:
Account Activation
With the account activation callback, you will get the following form values:
username: <vpanel_username>
status: ACTIVATED
comments: GENERIC ACTIVATION
SQL Cluster Addition
When is the SQL Cluster callback sent? The SQL Cluster callback is generally sent a few seconds after an account has been activated for the first time.
With the SQL cluster addition callback, you will get the following form values:
username: <vpanel_username>
status: <sql_cluster_id>
comments: SQL_SERVER
Account Suspension
What are the comments that you could receive when an account gets suspended?
Permanent suspension reasons:
PHISHING
VIRUS_MALWARE_HOSTING
NULLED_SCRIPT
CONTENT_VIOLATION
ABUSE_COMPLAINT
SPAM_DOMAIN_SIGNUP
REQUESTED
ADMIN_SUSPEND
ADMIN_CLOSE : <reason>
RES_CLOSE : <reason>
OTHER
Temporary suspension reasons:
DAILY_IO
DAILY_HIT
MYSQL_OVERLOAD
Inactivity suspension reasons:
AUTO_IDLE
With the account suspension callback, you will get the following form values:
username: <vpanel_username>
status: SUSPENDED
comments: <comment> : <reason>
Account Reactivation
With the account reactivation callback, you will get the following form values:
username: <vpanel_username>
status: REACTIVATE
comments: GENERIC REACT
Account Deletion
When does an account get auto-deleted? An account usually gets deleted about 60 days after a suspension. In the case that an account went into an auto-idle state it's about 2 days.
With the account deletion callback, you will get the following form values:
username: <vpanel_username>
status: DELETE
comments: <vpanel_username>
Domain Added to Account
What are the domain codes?
Parked Domain Added: CLIENTPARKADD
Subdomain Added: CLIENTSUBADD
Addon Domain Added: CLIENTDOMADD
When the client adds a domain to an account, you will get the following form values:
username: <vpanel_username>
status: <domain_code>
comments: <vpanel_username>
Domain Removed from Account
What are the domain codes?
Parked Domain Removed: CLIENTPARKREM
Subdomain Removed: CLIENTSUBREM
Addon Domain Removed: CLIENTDOMREM
When the client removes a domain from an account, you will get the following form values:
username: <vpanel_username>
status: <domain_code>
comments: <vpanel_username>
Ticket System Callbacks
Important Note: The callback URL that you entered in the MOFH panel above is the same URL that the ticket callback system uses.
Ticket Response
With the ticket response callback, you will get one of the following form values:
Type 1 (Support Agent Response):
callback_type: ticket
ticket_id: <6-digit number>
support_reply: <support agent's reply>
ticket_status: S
Type 2 (Ticket Closed):
callback_type: ticket
ticket_id: <6-digit number>
support_reply: Ticket status changed to Closed at <date>, <time><br><br>Please do reply to this ticket if you have any further queries and we will happily assist.
ticket_status: C