Documentation
¶
Index ¶
- Variables
- func BuildSendBody(opts SendOpts) map[string]interface{}
- func CheckAppAssociation(dashClient *api.Client, acctID, appID string) (bool, string)
- func CheckCallbackURL(dashClient *api.Client, acctID, appID string) string
- func ValidateSendOpts(opts SendOpts) error
- type PreflightResult
- type SendOpts
Constants ¶
This section is empty.
Variables ¶
var Cmd = &cobra.Command{
Use: "message",
Short: "Send and manage SMS/MMS messages",
}
Cmd is the `band message` parent command.
Functions ¶
func BuildSendBody ¶
BuildSendBody builds the request body for sending a message.
func CheckAppAssociation ¶
CheckAppAssociation verifies that a messaging application is linked to at least one location (SIP peer). If it has no associations, messages sent through it will silently vanish — 202 accepted but never delivered.
It checks both the app's associatedsippeers endpoint AND each location's applicationSettings (the assignment may only be visible from the location side).
func CheckCallbackURL ¶
CheckCallbackURL verifies that the messaging application has a callback URL that looks like a real server. Without one, delivery confirmations are lost.
func ValidateSendOpts ¶
ValidateSendOpts validates the send options before making the API call.
Types ¶
type PreflightResult ¶
type PreflightResult struct {
Ready bool
NumberType cmdutil.NumberType
CampaignID string // non-empty if assigned to a 10DLC campaign
Message string // human-readable status
}
PreflightResult describes whether a number is ready to send messages.
func CheckMessagingReadiness ¶
func CheckMessagingReadiness(platClient *api.Client, acctID, fromNumber string) PreflightResult
CheckMessagingReadiness verifies that a phone number is properly provisioned for messaging. For 10DLC numbers, it checks campaign assignment via the tendlc API. For toll-free and short codes, it returns advisory messages since those checks require credentials we may not have.