jointrashposs/content/pl/docs/2.for-users/3.features/webhook.md
かっこかり d7ad8387a9
New Crowdin updates (#92)
* New translations 1.about-misskey.md (French)

* New translations 2.get-started.md (French)

* New translations 3.join-server.md (French)

* New translations 4.things-to-know.md (French)

* New translations ads.md (French)

* New translations drive.md (French)

* New translations mfm.md (French)

* New translations mute-and-block.md (French)

* New translations pages.md (French)

* New translations poll.md (French)

* New translations thread-mute.md (French)

* New translations webhook.md (French)

* New translations 1.troubleshooting.md (French)

* New translations donate.md (French)

* New translations misskey-hub.md (French)

* New translations announcement.md (French)

* New translations role.md (French)

* New translations 1.index.md (French)

* New translations bash.md (French)

* New translations docker.md (French)

* New translations kubernetes.md (French)

* New translations manual.md (French)

* New translations ubuntu-manual.md (French)

* New translations cdn.md (French)

* New translations disable-timelines.md (French)

* New translations 1.index.md (French)

* New translations permission.md (French)

* New translations 1.index.md (French)

* New translations token.md (French)

* New translations 5.releases.md (French)

* New translations 1.about-misskey.md (Italian)

* New translations 2.get-started.md (Italian)

* New translations 3.join-server.md (Italian)

* New translations 4.things-to-know.md (Italian)

* New translations ads.md (Italian)

* New translations drive.md (Italian)

* New translations mfm.md (Italian)

* New translations mute-and-block.md (Italian)

* New translations pages.md (Italian)

* New translations poll.md (Italian)

* New translations share-form.md (Italian)

* New translations thread-mute.md (Italian)

* New translations webhook.md (Italian)

* New translations 1.troubleshooting.md (Italian)

* New translations donate.md (Italian)

* New translations misskey-hub.md (Italian)

* New translations announcement.md (Italian)

* New translations role.md (Italian)

* New translations 1.index.md (Italian)

* New translations bash.md (Italian)

* New translations docker.md (Italian)

* New translations kubernetes.md (Italian)

* New translations manual.md (Italian)

* New translations ubuntu-manual.md (Italian)

* New translations cdn.md (Italian)

* New translations disable-timelines.md (Italian)

* New translations 1.index.md (Italian)

* New translations permission.md (Italian)

* New translations 1.index.md (Italian)

* New translations token.md (Italian)

* New translations 5.releases.md (Italian)

* New translations 1.about-misskey.md (Korean)

* New translations 1.warning.md (Korean)

* New translations 2.get-started.md (Korean)

* New translations 3.join-server.md (Korean)

* New translations 4.things-to-know.md (Korean)

* New translations ads.md (Korean)

* New translations drive.md (Korean)

* New translations mfm.md (Korean)

* New translations mute-and-block.md (Korean)

* New translations pages.md (Korean)

* New translations poll.md (Korean)

* New translations share-form.md (Korean)

* New translations thread-mute.md (Korean)

* New translations webhook.md (Korean)

* New translations 1.troubleshooting.md (Korean)

* New translations donate.md (Korean)

* New translations misskey-hub.md (Korean)

* New translations announcement.md (Korean)

* New translations role.md (Korean)

* New translations 1.index.md (Korean)

* New translations bash.md (Korean)

* New translations docker.md (Korean)

* New translations kubernetes.md (Korean)

* New translations manual.md (Korean)

* New translations ubuntu-manual.md (Korean)

* New translations cdn.md (Korean)

* New translations disable-timelines.md (Korean)

* New translations 1.index.md (Korean)

* New translations permission.md (Korean)

* New translations 1.index.md (Korean)

* New translations token.md (Korean)

* New translations 5.releases.md (Korean)

* New translations 1.about-misskey.md (Polish)

* New translations 2.get-started.md (Polish)

* New translations 3.join-server.md (Polish)

* New translations 4.things-to-know.md (Polish)

* New translations ads.md (Polish)

* New translations drive.md (Polish)

* New translations mfm.md (Polish)

* New translations mute-and-block.md (Polish)

* New translations pages.md (Polish)

* New translations poll.md (Polish)

* New translations share-form.md (Polish)

* New translations thread-mute.md (Polish)

* New translations webhook.md (Polish)

* New translations 1.troubleshooting.md (Polish)

* New translations donate.md (Polish)

* New translations misskey-hub.md (Polish)

* New translations announcement.md (Polish)

* New translations role.md (Polish)

* New translations 1.index.md (Polish)

* New translations bash.md (Polish)

* New translations docker.md (Polish)

* New translations kubernetes.md (Polish)

* New translations manual.md (Polish)

* New translations ubuntu-manual.md (Polish)

* New translations cdn.md (Polish)

* New translations disable-timelines.md (Polish)

* New translations 1.index.md (Polish)

* New translations permission.md (Polish)

* New translations 1.index.md (Polish)

* New translations token.md (Polish)

* New translations 5.releases.md (Polish)

* New translations ja-jp.yml (Chinese Simplified)

* New translations 1.about-misskey.md (Chinese Simplified)

* New translations 2.get-started.md (Chinese Simplified)

* New translations 3.join-server.md (Chinese Simplified)

* New translations 4.things-to-know.md (Chinese Simplified)

* New translations ads.md (Chinese Simplified)

* New translations drive.md (Chinese Simplified)

* New translations mfm.md (Chinese Simplified)

* New translations mute-and-block.md (Chinese Simplified)

* New translations pages.md (Chinese Simplified)

* New translations poll.md (Chinese Simplified)

* New translations share-form.md (Chinese Simplified)

* New translations thread-mute.md (Chinese Simplified)

* New translations webhook.md (Chinese Simplified)

* New translations 1.troubleshooting.md (Chinese Simplified)

* New translations donate.md (Chinese Simplified)

* New translations misskey-hub.md (Chinese Simplified)

* New translations announcement.md (Chinese Simplified)

* New translations role.md (Chinese Simplified)

* New translations 1.index.md (Chinese Simplified)

* New translations bash.md (Chinese Simplified)

* New translations docker.md (Chinese Simplified)

* New translations kubernetes.md (Chinese Simplified)

* New translations manual.md (Chinese Simplified)

* New translations ubuntu-manual.md (Chinese Simplified)

* New translations cdn.md (Chinese Simplified)

* New translations disable-timelines.md (Chinese Simplified)

* New translations 1.index.md (Chinese Simplified)

* New translations permission.md (Chinese Simplified)

* New translations 1.index.md (Chinese Simplified)

* New translations token.md (Chinese Simplified)

* New translations 5.releases.md (Chinese Simplified)

* New translations 1.about-misskey.md (Chinese Traditional)

* New translations 2.get-started.md (Chinese Traditional)

* New translations 3.join-server.md (Chinese Traditional)

* New translations 4.things-to-know.md (Chinese Traditional)

* New translations ads.md (Chinese Traditional)

* New translations drive.md (Chinese Traditional)

* New translations mfm.md (Chinese Traditional)

* New translations mute-and-block.md (Chinese Traditional)

* New translations pages.md (Chinese Traditional)

* New translations poll.md (Chinese Traditional)

* New translations share-form.md (Chinese Traditional)

* New translations thread-mute.md (Chinese Traditional)

* New translations webhook.md (Chinese Traditional)

* New translations 1.troubleshooting.md (Chinese Traditional)

* New translations donate.md (Chinese Traditional)

* New translations misskey-hub.md (Chinese Traditional)

* New translations announcement.md (Chinese Traditional)

* New translations role.md (Chinese Traditional)

* New translations 1.index.md (Chinese Traditional)

* New translations bash.md (Chinese Traditional)

* New translations docker.md (Chinese Traditional)

* New translations kubernetes.md (Chinese Traditional)

* New translations manual.md (Chinese Traditional)

* New translations ubuntu-manual.md (Chinese Traditional)

* New translations cdn.md (Chinese Traditional)

* New translations disable-timelines.md (Chinese Traditional)

* New translations 1.index.md (Chinese Traditional)

* New translations permission.md (Chinese Traditional)

* New translations 1.index.md (Chinese Traditional)

* New translations token.md (Chinese Traditional)

* New translations publish-on-your-website.md (Chinese Traditional)

* New translations 5.releases.md (Chinese Traditional)

* New translations 1.about-misskey.md (English)

* New translations 2.get-started.md (English)

* New translations 3.join-server.md (English)

* New translations 4.things-to-know.md (English)

* New translations ads.md (English)

* New translations drive.md (English)

* New translations mfm.md (English)

* New translations mute-and-block.md (English)

* New translations pages.md (English)

* New translations poll.md (English)

* New translations share-form.md (English)

* New translations thread-mute.md (English)

* New translations webhook.md (English)

* New translations 1.troubleshooting.md (English)

* New translations donate.md (English)

* New translations misskey-hub.md (English)

* New translations announcement.md (English)

* New translations role.md (English)

* New translations 1.index.md (English)

* New translations bash.md (English)

* New translations docker.md (English)

* New translations kubernetes.md (English)

* New translations manual.md (English)

* New translations ubuntu-manual.md (English)

* New translations cdn.md (English)

* New translations disable-timelines.md (English)

* New translations 1.index.md (English)

* New translations permission.md (English)

* New translations 1.index.md (English)

* New translations token.md (English)

* New translations 5.releases.md (English)

* New translations 1.about-misskey.md (Indonesian)

* New translations 2.get-started.md (Indonesian)

* New translations 3.join-server.md (Indonesian)

* New translations 4.things-to-know.md (Indonesian)

* New translations ads.md (Indonesian)

* New translations drive.md (Indonesian)

* New translations mfm.md (Indonesian)

* New translations mute-and-block.md (Indonesian)

* New translations pages.md (Indonesian)

* New translations poll.md (Indonesian)

* New translations share-form.md (Indonesian)

* New translations thread-mute.md (Indonesian)

* New translations webhook.md (Indonesian)

* New translations 1.troubleshooting.md (Indonesian)

* New translations donate.md (Indonesian)

* New translations misskey-hub.md (Indonesian)

* New translations announcement.md (Indonesian)

* New translations role.md (Indonesian)

* New translations 1.index.md (Indonesian)

* New translations bash.md (Indonesian)

* New translations docker.md (Indonesian)

* New translations kubernetes.md (Indonesian)

* New translations manual.md (Indonesian)

* New translations ubuntu-manual.md (Indonesian)

* New translations cdn.md (Indonesian)

* New translations disable-timelines.md (Indonesian)

* New translations 1.index.md (Indonesian)

* New translations permission.md (Indonesian)

* New translations 1.index.md (Indonesian)

* New translations token.md (Indonesian)

* New translations 5.releases.md (Indonesian)
2023-12-29 13:23:03 +09:00

207 lines
4.1 KiB
Markdown

# Webhook
:::tip
バージョン 12.109.0 以降の機能です。
:::
:::warning
実験的な機能であるため、動作が不安定だったり今後仕様が変更される可能性があります。
:::
MisskeyにはWebhookが用意されています。Webhookを利用すると、Misskey上の様々なイベントをリアルタイムに受け取ることが可能です。
設定>Webhook でWebhookの管理を行えます。
Webhookが登録されると、指定したイベントが発生した際に、指定したURLにHTTPリクエストが送信されます。リクエストのメソッドはPOSTで、ボディはJSONです。
さらに、リクエストヘッダーには`X-Misskey-Hook-Secret`という名前で、登録時に設定したシークレットが含まれます。このシークレットが正しいか検証することで、リクエストが正規のものか判定することができます。
リクエストペイロードは以下のプロパティが入ります。
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
hookId: {
type: 'string',
description: 'Webhook ID',
},
userId: {
type: 'string',
description: 'Webhook作成者のユーザーID',
},
eventId: {
type: 'string',
description: 'イベントのID',
},
createdAt: {
type: 'integer',
description: 'イベントが発生した日時(UNIX time、ミリ秒)',
},
type: {
type: 'string',
description: 'イベントの種類',
},
body: {
type: 'object',
description: 'イベントのペイロード',
},
}
}"/>
送信先サーバーが5xxエラーを返すか、応答しなかった場合は時間を開けてリクエストが再送されます。
Webhookは管理画面から個別にアクティブ状態を設定でき、一時的にリクエストの送信を停止させることができます。
## イベント
イベントごとに説明とペイロードを示します。
### follow
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
user: {
$ref: 'misskey://User',
description: 'フォローを行ったユーザー',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
user: {
$ref: 'misskey://User',
description: 'フォローしたユーザー',
},
}
}"/>
### followed
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
user: {
$ref: 'misskey://User',
description: 'フォロー解除したユーザー',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
user: {
$ref: 'misskey://User',
description: 'フォローを行ったユーザー',
},
}
}"/>
### unfollow
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: '作成されたノート',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
user: {
$ref: 'misskey://User',
description: 'フォロー解除したユーザー',
},
}
}"/>
### note
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: '返信',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: '作成されたノート',
},
}
}"/>
### reply
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: 'Renote',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: '返信',
},
}
}"/>
### renote
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: 'メンションを含むノート',
},
}
}"/>
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: 'Renote',
},
}
}"/>
### mention
自分にメンションされた際に発生します。
<MkSchemaViewerItemObject :schema="{
type: 'object',
properties: {
note: {
$ref: 'misskey://Note',
description: 'メンションを含むノート',
},
}
}"/>