私は特定のプロジェクトのイベントアップデートを私に送信するためにWebhookをAsanaに設定しようとしています。私はかなり初心者なので、読んでお答えするときはそれを覚えておいてください。ここに私の最初の投稿は私の上で簡単に行く。ここに私のコードがあります。WebhookをAsana用に作成する
asanawebhook.phpページ:ウェブフックを作成する
$headers = getallheaders();
$secret_token = $headers['X-Hook-Secret'];
header('X-Hook-Secret: ' . $secret_token);
header("HTTP/1.1 200 OK");
私のカール要求:
$apikey = "mykey"; // Your API key
$taskid = "resourceid";
exec('curl \
-H "Authorization: Bearer '.$apikey.'" \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST https://app.asana.com/api/1.0/webhooks \
-d "resource='.$taskid.'" \
-d "target=https://mywebsite.com/folders/asanawebhook.php"', $return);
print_r($return);
これは私に私のページに印刷され、このエラーを取得されています。
Array ([0] => {"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"}]})
私はいくつかの種類の成功メッセージを返すように得ることができる場合、私は、データを解析し、完全なペイロードを取得するために戻ってアサナにカールの要求を行うことができますと仮定します。前もって感謝します。
同じ問題があります - SSLは動作していますが、同じエラーです。私のためのアドバイスは何ですか? –
私は問題が私のLet's Encrypt証明書であると思います... –