メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
hooks
/
{id}
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.GetHookRequestParameters{
        Fields: management.String(
            "fields",
        ),
    }
    client.Hooks.Get(
        context.TODO(),
        "id",
        request,
    )
}
{
  "triggerId": "<string>",
  "id": "00001",
  "name": "hook",
  "enabled": true,
  "script": "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };",
  "dependencies": {}
}

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

ID of the hook to retrieve.

クエリパラメータ

fields
string

Comma-separated list of fields to include in the result. Leave empty to retrieve all fields.

レスポンス

Hook successfully retrieved.

triggerId
string

Trigger ID

id
string
デフォルト:00001

ID of this hook.

name
string
デフォルト:hook

Name of this hook.

enabled
boolean
デフォルト:true

Whether this hook will be executed (true) or ignored (false).

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

Code to be executed when this hook runs.

dependencies
object

Dependencies of this hook used by webtask server.