page_title | description |
---|---|
Retrieve triggers available within actions |
Retrieve the set of triggers currently available within actions. |
In this guide we'll show how to retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound.
Head to the APIs section of your Auth0 Dashboard and select Auth0 Management API.
Select Create & Authorize Test Application within the API Explorer tab.
Copy the Token contents and go to the Management API Explorer.
Select Set API Token button at the top left.
Set the API Token by pasting the Token that you copied above.
Select Set Token button.
Retrieve the set of triggers available within actions by selecting the Try button at https://auth0.com/docs/api/management/v2#!/Actions/get_triggers.
At the time of writing (2022-10-17) the available triggers are the following:
{
"triggers": [
{
"id": "post-login",
"version": "v2",
"status": "DEPRECATED",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "post-login",
"version": "v3",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": [
{
"id": "post-login",
"version": "v2"
}
]
},
{
"id": "post-login",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"default_runtime": "node12",
"compatible_triggers": []
},
{
"id": "credentials-exchange",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"default_runtime": "node12",
"compatible_triggers": []
},
{
"id": "credentials-exchange",
"version": "v2",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "pre-user-registration",
"version": "v2",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "pre-user-registration",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"default_runtime": "node12",
"compatible_triggers": []
},
{
"id": "post-user-registration",
"version": "v2",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "post-user-registration",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"default_runtime": "node12",
"compatible_triggers": []
},
{
"id": "post-change-password",
"version": "v2",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "post-change-password",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"default_runtime": "node12",
"compatible_triggers": []
},
{
"id": "send-phone-message",
"version": "v2",
"status": "CURRENT",
"runtimes": [
"node12",
"node16"
],
"default_runtime": "node16",
"compatible_triggers": []
},
{
"id": "send-phone-message",
"version": "v1",
"status": "DEPRECATED",
"runtimes": [
"node12"
],
"compatible_triggers": []
}
]
}
Use these to set up your supported_triggers
block within the auth0_action
resource:
resource "auth0_action" "my_action" {
name = format("Test Action %s", timestamp())
runtime = "node16"
code = <<-EOT
exports.onExecutePostLogin = async (event, api) => {
console.log(event);
};
EOT
supported_triggers {
id = "post-login"
version = "v3"
}
}