Chatwork Webhook APIの通知内容


WebhookAPIに呼び出されたAzureFunctionsが認識する事項

sample.json
{
    "method": "POST",
    "url": "(FunctionsのURL)?chatwork_webhook_signature=(xxxxx)",
    "originalUrl": "(FunctionsのURL)?chatwork_webhook_signature=(xxxxx)&code=(Functionsの認証コード)",
    "headers": {
        "connection": "Keep-Alive",
        "content-length": "324",
        "content-type": "application/json",
        "host": "(FunctionsのHost)",
        "max-forwards": "9",
        "user-agent": "ChatWork-Webhook/0.1.0-SNAPSHOT",
        "x-chatworkwebhooksignature": "(querystringのxxxxxと同じ)",
        "x-waws-unencoded-url": "(FunctionsのPath)?chatwork_webhook_signature=(xxxxx)&code=(Functionsの認証コード)",
        "client-ip": "xxx.xxx.xxx.xxx:xxxxx",
        "x-arr-log-id": "llllllllllllllll",
        "x-site-deployment-id": "(Functionsの名称)",
        "was-default-hostname": "(FunctionsのHost)",
        "x-original-url": "(ヘッダー、x-waws-unencoded-urlと同じ?)",
        "x-forwarded-for": "xxx.xxx.xxx.xxx:xxxxx",
        "x-arr-ssl": "2048|256|C=US, S=Washington, L=Redmond, O=Microsoft Corporation, OU=Microsoft IT, CN=Microsoft IT TLS CA 5|CN=*.azurewebsites.net",
        "x-forwarded-proto": "https",
        "x-appservice-proto": "https",
        "x-forwarded-tlsversion": "1.2",
        "disguised-host": "(FunctionsのHost)"
    },
    "query": {
        "chatwork_webhook_signature": "(xxxxx)",
        "code": "(Functionsの認証コード)"
    },
    "params": {},
    "body": {
        "webhook_setting_id": "xxxx",
        "webhook_event_type": "message_created",
        "webhook_event_time": 1603899475,
        "webhook_event": {
            "message_id": "mmmmmmmmmmmmmmm",
            "room_id": nnnnnn,
            "account_id": uuuuu,
            "body": "(チャット本文)",
            "send_time": 1603899474,
            "update_time": 0
        }
    },
    "rawBody": "(上記bodyの生データ)"
}