Get Webhook List
The Get Webhook List method allows you to retrieve a list of webhooks created in your account along with detailed information for each.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{}
Response
{
"result": true,
"data": [
{
"id": "YOUR_WEBHOOK_ID_1",
"title": "YOUR_WEBHOOK_TITLE_1",
"url": "YOUR_WEBHOOK_URL_1",
"createdAt": "2033-07-27 12:41:38",
"domain": {
"id": "YOUR_DOMAIN_ID",
"name": "YOUR_DOMAIN_NAME"
},
"events": [
"Selected WebHook Events"
]
},
{
"id": "YOUR_WEBHOOK_ID_2",
"title": "YOUR_WEBHOOK_TITLE_2",
"url": "YOUR_WEBHOOK_URL_2",
"createdAt": "2017-09-13 15:33:38",
"domain": {
"id": "YOUR_DOMAIN_ID",
"name": "YOUR_DOMAIN_NAME"
},
"events": [
"Selected WebHook Events"
]
}
]
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
Indicated that the query was successful or not:
|
data |
object |
An array of objects with data about all your webhooks. |
data.id |
integer |
ID of the webhook |
data.title |
string |
Title of the webhook |
data.url |
string |
The URL to which all requests with data from the Webhook will be sent. |
data.createdAt |
string |
The date when the webhook was created. |
data.domain |
object |
An object with the data about the domain for which the webhook was created. |
data.domain.id |
string |
The domain ID for which the webhook was created. |
data.domain.name |
string |
The domain for which the webhook was created. |
data.events |
array |
An array of events selected during the creation of the WebHook, upon which a request with data will be sent to the specified URL. |
Method Errors
{
"result": false,
"errors": [
"Error description text"
]
}
Error |
---|
"There is no web hook configurations in your account" |
"Invalid authorization token!" |
"Internal server error" |
"Bad Request" |
"no matches found for access token {accessToken}" |
"user {id} not enabled" |
"no data found for key {userId}" |
"access token check failed for key/secret $key/$accessToken" |
"Argument {argument} required" |
Code Examples
$accessToken = 'YOUR_API_KEY';
$url = 'https://api.wooxy.com/v3/webhook/list';
$body = json_encode([]);
/** * Request Example */
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Access-Token: $accessToken",
'Content-Type: application/json',
'Content-Length: ' . strlen($body),
]);
$result = curl_exec($ch);
if ($result === false) {
echo 'cURL error: ' . curl_error($ch) . PHP_EOL;
} else {
echo strval($result) . PHP_EOL;
}
curl_close($ch);