Skip to main content
GET
https://{tenantDomain}/api/v2
/
hooks
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.ListAsync(
            new ListHooksRequestParameters {
                Page = 1,
                PerPage = 1,
                IncludeTotals = true,
                Enabled = true,
                Fields = "fields",
                TriggerId = HookTriggerIdEnum.CredentialsExchange
            }
        );
    }

}
[
  {
    "triggerId": "<string>",
    "id": "00001",
    "name": "hook",
    "enabled": true,
    "script": "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };",
    "dependencies": {}
  }
]

Authorizations

Authorization
string
header
required

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

Query Parameters

page
integer

Page index of the results to return. First page is 0.

Required range: x >= 0
per_page
integer

Number of results per page.

Required range: 0 <= x <= 100
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

enabled
boolean

Optional filter on whether a hook is enabled (true) or disabled (false).

fields
string

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

triggerId
enum<string>

Retrieves hooks that match the trigger

Available options:
credentials-exchange,
pre-user-registration,
post-user-registration,
post-change-password,
send-phone-message

Response

Hooks successfully retrieved.

triggerId
string

Trigger ID

id
string
default:00001

ID of this hook.

name
string
default:hook

Name of this hook.

enabled
boolean
default:true

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
object

Dependencies of this hook used by webtask server.