C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Hooks.GetAsync(
id: "id",
request: new GetHookRequestParameters {
Fields = "fields"
}
);
}
}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,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.hooks.requests.GetHookRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.hooks().get(
"id",
GetHookRequestParameters
.builder()
.fields("fields")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Hooks\Requests\GetHookRequestParameters;
$client = new Management(
token: '<token>',
);
$client->hooks->get(
'id',
new GetHookRequestParameters([
'fields' => 'fields',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.hooks.get(
id="id",
fields="fields",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.hooks.get(
id: "id",
fields: "fields"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.get("id", {
fields: "fields",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.get("id", {
fields: "fields",
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/hooks/{id} \
--header 'Authorization: Bearer <token>'{
"triggerId": "<string>",
"id": "00001",
"name": "hook",
"enabled": true,
"script": "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };",
"dependencies": {}
}Get a hook
Retrieve a hook by its ID. Accepts a list of fields to include in the result.
GET
https://{tenantDomain}/api/v2
/
hooks
/
{id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Hooks.GetAsync(
id: "id",
request: new GetHookRequestParameters {
Fields = "fields"
}
);
}
}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,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.hooks.requests.GetHookRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.hooks().get(
"id",
GetHookRequestParameters
.builder()
.fields("fields")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Hooks\Requests\GetHookRequestParameters;
$client = new Management(
token: '<token>',
);
$client->hooks->get(
'id',
new GetHookRequestParameters([
'fields' => 'fields',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.hooks.get(
id="id",
fields="fields",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.hooks.get(
id: "id",
fields: "fields"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.get("id", {
fields: "fields",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.get("id", {
fields: "fields",
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/hooks/{id} \
--header 'Authorization: Bearer <token>'{
"triggerId": "<string>",
"id": "00001",
"name": "hook",
"enabled": true,
"script": "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };",
"dependencies": {}
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the hook to retrieve.
Query Parameters
Comma-separated list of fields to include in the result. Leave empty to retrieve all fields.
Response
Hook successfully retrieved.
Trigger ID
ID of this hook.
Name of this hook.
Whether this hook will be executed (true) or ignored (false).
script
string
default:module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };
Code to be executed when this hook runs.
Dependencies of this hook used by webtask server.
Show child attributes
Show child attributes
⌘I