我试图为 Asana 中的一项任务创建一个 webhook,但我得到的唯一响应是:
{
"errors": [
{
"message": "Could not complete activation handshake with target URL. Please ensure that the receiving server is accepting connections and supports SSL",
"help": "For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"
}
]
}
(状态:400 错误请求)
我正在通过 Postman 发送 POST 请求,https://app.asana.com/api/1.0/webhooks
其中包含以下内容:
{
"data":
{
"resource": 123456789012345,
"target": "https://example.com/asana.php"
}
}
asana.php
看起来像这样:
$headers = getallheaders();
$secret_token = $headers['X-Hook-Secret'];
header('X-Hook-Secret: ' . $secret_token);
我究竟做错了什么?我错过了什么吗?