Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback Update #22

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ title: Changelog
# Changelog
This is a list of changes made to the documentation. The most recent changes are at the top.

## 2023-01-20
* Added Ticketing System callback
* Added additional hosting account callbacks (Permanent & Temporary suspension / Inactivity)
* And did some miscellaneous changes

Thanks to `TinkerMan` from the [iFastNet Community Discord server](https://dsc.gg/ifastnet) for updating the callback documentation!

## 2023-01-09
* Changed index page
* Added docs for `removeacct` endpoint
Expand Down
53 changes: 50 additions & 3 deletions pages/initial-setup/callbacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Callbacks
import { Callout } from 'nextra-theme-docs'

# Callbacks
The MyOwnFreeHost API allows you to set up a callback URL that will be called when a user accounts gets activated, suspended or unsuspended, or when an SQL cluster gets added to a user.
The MyOwnFreeHost API allows you to set up a callback URL that will be called when a user accounts gets activated, suspended or unsuspended, or when an SQL cluster gets added to a user. The callback URL is also used for the ticketing system

## Setup

Expand All @@ -30,9 +30,9 @@ In this example the URL `https://example.com/callback` is used.

Then, click on "Update Settings" and everything should be set up!

## Callbacks
## Hosting Account Callbacks

The following callbacks are available:
The following hosting account callbacks are available:

### Account activation
With the account activation callback, you will get the following form values:
Expand All @@ -43,6 +43,12 @@ comments: GENERIC ACTIVATION
```

### SQL Cluster addition

<Callout emoji="ℹ️" type="info">
**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.
</Callout>

With the SQL cluster addition callback, you will get the following form values:
```
Form values:
Expand All @@ -54,14 +60,26 @@ comments: SQL_SERVER
### Account suspension
<Callout emoji="ℹ️" type="info">
**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`
- `REQUSTED`
- `ADMIN_SUSPEND`
- `ADMIN_CLOSE : <reason>`
- `RES_CLOSE : <comment>`
- `OTHER`

Temporary Suspension Reasons
- `DAILY_IO`
- `DAILY_HIT`
- `MYSQL_OVERLOAD`

Inactivity Suspension Reason
- `AUTO_IDLE`
</Callout>

With the account suspension callback, you will get the following form values:
Expand Down Expand Up @@ -94,3 +112,32 @@ username: <vpanel_username>
status: DELETE
comments: <vpanel_username>
```

## Ticketing System Callbacks

### Account suspension
<Callout emoji="ℹ️" type="info">
**Important Note:**
The callback URL that you entered in the MOFH panel above is the same URL that the ticketing system uses.
</Callout>

### Ticket response
With the ticket response callback, you will get one of the following form values:

Type 1 (Support Agent Response):
```
Form values:
callback_type: ticket
ticket_id: <6-digit number>
support_reply: <support agents reply>
ticket_status: S
```

Type 2 (Ticket Closed):
```
Form values:
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
```