TicketsManager

management. TicketsManager

Abstracts interaction with the tickets endpoint.

Constructor

new TicketsManager(options)

Source:
Parameters:
Name Type Description
options Object

The client options.

Name Type Attributes Description
baseUrl String

The URL of the API.

headers Object <optional>

Headers to be included in all requests.

retry Object <optional>

Retry Policy Config

Members

(inner) auth0RestClient :external:RestClient

Provides an abstraction layer for consuming the Tickets endpoint.

Source:
Type:

Methods

changePassword(cbopt) → {Promise}

Create a new password change ticket.

Source:
Parameters:
Name Type Attributes Description
cb function <optional>

Callback function.

Returns:
Type:
Promise
Example
var params = {
  result_url: '{REDIRECT_URL}',  // Redirect after using the ticket.
  user_id: '{USER_ID}',  // Optional.
  email: '{USER_EMAIL}',  // Optional.
  new_password: '{PASSWORD}'
};

management.tickets.changePassword(params, function (err) {
  if (err) {
    // Handle error.
  }
});

verifyEmail(cbopt) → {Promise}

Create an email verification ticket.

Source:
Parameters:
Name Type Attributes Description
cb function <optional>

Callback function.

Returns:
Type:
Promise
Example
var data = {
  user_id: '{USER_ID}',
  result_url: '{REDIRECT_URL}' // Optional redirect after the ticket is used.
};

management.tickets.verifyEmail(data, function (err) {
  if (err) {
    // Handle error.
  }
});