Skip to main content
POST
C#

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

name
string
デフォルト:my-hook
必須

このフックの名前。

Pattern: ^[a-zA-Z0-9]([ \-a-zA-Z0-9]*[a-zA-Z0-9])?$
script
string
デフォルト:module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };
必須

このフックの実行時に実行されるコード。

Minimum string length: 1
triggerId
enum<string>
必須

このルールの実行ステージ。credentials-exchangepre-user-registrationpost-user-registrationpost-change-password、または send-phone-message を指定できます。

利用可能なオプション:
credentials-exchange,
pre-user-registration,
post-user-registration,
post-change-password,
send-phone-message
dependencies
object

webtask server が使用する、このフックの依存関係。

enabled
boolean
デフォルト:false

このフックを実行するか (true)、無視するか (false)。

レスポンス

Hook を正常に作成しました。

dependencies
object

webtask server が使用する、このフックの依存関係。

enabled
boolean
デフォルト:true

このフックを実行するか (true)、無視するか (false)。

id
string
デフォルト:00001

このフックの ID。

name
string
デフォルト:hook

このフックの名前。

script
string
デフォルト:module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };

このフックの実行時に実行されるコード。

triggerId
string

トリガー ID