Skip to main content
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
phone
/
message-types
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    factors "github.com/auth0/go-auth0/management/management/guardian/factors"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &factors.SetGuardianFactorPhoneMessageTypesRequestContent{
        MessageTypes: []management.GuardianFactorPhoneFactorMessageTypeEnum{
            management.GuardianFactorPhoneFactorMessageTypeEnumSms,
        },
    }
    client.Guardian.Factors.Phone.SetMessageTypes(
        context.TODO(),
        request,
    )
}
{
  "message_types": [
    "sms"
  ]
}

Authorizations

Authorization
string
header
required

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

Body

message_types
enum<string>[]
required

The list of phone factors to enable on the tenant. Can include sms and voice.

Available options:
sms,
voice

Response

Returns selected SMS provider configuration

message_types
enum<string>[]

The list of phone factors to enable on the tenant. Can include sms and voice.

Available options:
sms,
voice