package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
phone "github.com/auth0/go-auth0/management/management/branding/phone"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &phone.CreateBrandingPhoneProviderRequestContent{
Name: management.PhoneProviderNameEnumTwilio,
Credentials: &management.PhoneProviderCredentials{
TwilioProviderCredentials: &management.TwilioProviderCredentials{
AuthToken: "auth_token",
},
},
}
client.Branding.Phone.Providers.Create(
context.TODO(),
request,
)
}{
"name": "twilio",
"id": "<string>",
"tenant": "<string>",
"channel": "phone",
"disabled": true,
"configuration": {
"sid": "<string>",
"delivery_methods": [
"text"
],
"default_from": "<string>",
"mssid": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Create a phone provider.
The credentials object requires different properties depending on the phone provider (which is specified using the name property).
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
phone "github.com/auth0/go-auth0/management/management/branding/phone"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &phone.CreateBrandingPhoneProviderRequestContent{
Name: management.PhoneProviderNameEnumTwilio,
Credentials: &management.PhoneProviderCredentials{
TwilioProviderCredentials: &management.TwilioProviderCredentials{
AuthToken: "auth_token",
},
},
}
client.Branding.Phone.Providers.Create(
context.TODO(),
request,
)
}{
"name": "twilio",
"id": "<string>",
"tenant": "<string>",
"channel": "phone",
"disabled": true,
"configuration": {
"sid": "<string>",
"delivery_methods": [
"text"
],
"default_from": "<string>",
"mssid": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://auth0-feat-custom-rate-limit-policies.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Phone provider configuration schema
Name of the phone notification provider
twilio, custom 1 - 100Provider credentials required to use authenticate to the provider.
Show child attributes
Whether the provider is enabled (false) or disabled (true).
Show child attributes
Phone notification provider successfully created.
Phone provider configuration schema
Name of the phone notification provider
twilio, custom 1 - 1001 - 255The name of the tenant
1 - 255This depicts the type of notifications this provider can receive.
phone 100Whether the provider is enabled (false) or disabled (true).
Show child attributes
The provider's creation date and time in ISO 8601 format
27The date and time of the last update to the provider in ISO 8601 format
27Cette page vous a-t-elle été utile ?