Back to Node Auth0

Class PhoneClient

docs/classes/management.SDK.PhoneClient-1.html

5.9.113.6 KB
Original Source

Class PhoneClient

Index

Constructors

constructor

Methods

getMessageTypessetMessageTypesgetTwilioProvidersetTwilioProvidergetSelectedProvidersetProvidergetTemplatessetTemplates

Properties

_options

Constructors

constructor

new PhoneClient(options: BaseClientOptions): PhoneClient

Parameters

Returns PhoneClient

Methods

getMessageTypes

getMessageTypes(
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<GetGuardianFactorPhoneMessageTypesResponseContent>

Retrieve list of phone-type MFA factors (i.e., sms and voice) that are enabled for your tenant.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<GetGuardianFactorPhoneMessageTypesResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.getMessageTypes()Copy

setMessageTypes

setMessageTypes(
request: SetGuardianFactorPhoneMessageTypesRequestContent,
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<SetGuardianFactorPhoneMessageTypesResponseContent>

Replace the list of phone-type MFA factors (i.e., sms and voice) that are enabled for your tenant.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<SetGuardianFactorPhoneMessageTypesResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Example

await client.guardian.factors.phone.setMessageTypes({ message_types: ["sms"] })Copy

getTwilioProvider

getTwilioProvider(
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<GetGuardianFactorsProviderPhoneTwilioResponseContent>

Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review Configure SMS and Voice Notifications for MFA.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<GetGuardianFactorsProviderPhoneTwilioResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.getTwilioProvider()Copy

setTwilioProvider

setTwilioProvider(
request?: SetGuardianFactorsProviderPhoneTwilioRequestContent,
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<SetGuardianFactorsProviderPhoneTwilioResponseContent>

Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review Configure SMS and Voice Notifications for MFA.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<SetGuardianFactorsProviderPhoneTwilioResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.setTwilioProvider()Copy

getSelectedProvider

getSelectedProvider(
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<GetGuardianFactorsProviderPhoneResponseContent>

Retrieve details of the multi-factor authentication phone provider configured for your tenant.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<GetGuardianFactorsProviderPhoneResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.getSelectedProvider()Copy

setProvider

setProvider(
request: SetGuardianFactorsProviderPhoneRequestContent,
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<SetGuardianFactorsProviderPhoneResponseContent>

Parameters

Request-specific configuration.

Returns HttpResponsePromise<SetGuardianFactorsProviderPhoneResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.setProvider({ provider: "auth0" })Copy

getTemplates

getTemplates(
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<GetGuardianFactorPhoneTemplatesResponseContent>

Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<GetGuardianFactorPhoneTemplatesResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.getTemplates()Copy

setTemplates

setTemplates(
request: SetGuardianFactorPhoneTemplatesRequestContent,
requestOptions?: PhoneClient.RequestOptions,
): HttpResponsePromise<SetGuardianFactorPhoneTemplatesResponseContent>

Customize the messages sent to complete phone enrollment and verification (subscription required).

Parameters

Request-specific configuration.

Returns HttpResponsePromise<SetGuardianFactorPhoneTemplatesResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Example

await client.guardian.factors.phone.setTemplates({ enrollment_message: "enrollment_message", verification_message: "verification_message" })Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods getMessageTypessetMessageTypesgetTwilioProvidersetTwilioProvidergetSelectedProvidersetProvidergetTemplatessetTemplates Properties _options