Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) PullSmsReplyStatus(request *PullSmsReplyStatusRequest) (response *PullSmsReplyStatusResponse, err error)
- func (c *Client) PullSmsReplyStatusByPhoneNumber(request *PullSmsReplyStatusByPhoneNumberRequest) (response *PullSmsReplyStatusByPhoneNumberResponse, err error)
- func (c *Client) PullSmsSendStatus(request *PullSmsSendStatusRequest) (response *PullSmsSendStatusResponse, err error)
- func (c *Client) PullSmsSendStatusByPhoneNumber(request *PullSmsSendStatusByPhoneNumberRequest) (response *PullSmsSendStatusByPhoneNumberResponse, err error)
- func (c *Client) SendSms(request *SendSmsRequest) (response *SendSmsResponse, err error)
- type PullSmsReplyStatus
- type PullSmsReplyStatusByPhoneNumberRequest
- type PullSmsReplyStatusByPhoneNumberResponse
- type PullSmsReplyStatusRequest
- type PullSmsReplyStatusResponse
- type PullSmsSendStatus
- type PullSmsSendStatusByPhoneNumberRequest
- type PullSmsSendStatusByPhoneNumberResponse
- type PullSmsSendStatusRequest
- type PullSmsSendStatusResponse
- type SendSmsRequest
- type SendSmsResponse
- type SendStatus
Constants ¶
View Source
const APIVersion = "2019-07-11"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) PullSmsReplyStatus ¶
func (c *Client) PullSmsReplyStatus(request *PullSmsReplyStatusRequest) (response *PullSmsReplyStatusResponse, err error)
拉取短信回复状态
func (*Client) PullSmsReplyStatusByPhoneNumber ¶
func (c *Client) PullSmsReplyStatusByPhoneNumber(request *PullSmsReplyStatusByPhoneNumberRequest) (response *PullSmsReplyStatusByPhoneNumberResponse, err error)
拉取单个号码短信回复状态
func (*Client) PullSmsSendStatus ¶
func (c *Client) PullSmsSendStatus(request *PullSmsSendStatusRequest) (response *PullSmsSendStatusResponse, err error)
拉取短信下发状态
func (*Client) PullSmsSendStatusByPhoneNumber ¶
func (c *Client) PullSmsSendStatusByPhoneNumber(request *PullSmsSendStatusByPhoneNumberRequest) (response *PullSmsSendStatusByPhoneNumberResponse, err error)
拉取单个号码短信下发状态
func (*Client) SendSms ¶
func (c *Client) SendSms(request *SendSmsRequest) (response *SendSmsResponse, err error)
短信发送接口,用户给用户发短信验证码、通知类短信或营销短信。
type PullSmsReplyStatus ¶
type PullSmsReplyStatus struct { // 通道扩展码,默认没有开通(需要填空) ExtendCode *string `json:"ExtendCode,omitempty" name:"ExtendCode"` // 国家(或地区)码 NationCode *string `json:"NationCode,omitempty" name:"NationCode"` // 手机号码( e.164 标准) PhoneNumber *string `json:"PhoneNumber,omitempty" name:"PhoneNumber"` // 短信签名 Sign *string `json:"Sign,omitempty" name:"Sign"` // 用户回复的内容 ReplyContent *string `json:"ReplyContent,omitempty" name:"ReplyContent"` // 回复时间,UNIX 时间戳(单位:秒) ReplyTime *uint64 `json:"ReplyTime,omitempty" name:"ReplyTime"` }
type PullSmsReplyStatusByPhoneNumberRequest ¶
type PullSmsReplyStatusByPhoneNumberRequest struct { *tchttp.BaseRequest // 拉取起始时间,UNIX 时间戳(时间:秒) SendDateTime *string `json:"SendDateTime,omitempty" name:"SendDateTime"` // 偏移量 // 注:目前固定设置为0 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` // 拉取最大条数,最多 100 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` // 下发目的手机号码,依据 e.164 标准为:+[国家(或地区)码][手机号] ,示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。 PhoneNumber *string `json:"PhoneNumber,omitempty" name:"PhoneNumber"` // 短信SdkAppid在[短信控制台](https://console.cloud.tencent.com/sms/smslist) 添加应用后生成的实际SdkAppid,示例如1400006666。 SmsSdkAppid *string `json:"SmsSdkAppid,omitempty" name:"SmsSdkAppid"` }
func NewPullSmsReplyStatusByPhoneNumberRequest ¶
func NewPullSmsReplyStatusByPhoneNumberRequest() (request *PullSmsReplyStatusByPhoneNumberRequest)
func (*PullSmsReplyStatusByPhoneNumberRequest) FromJsonString ¶
func (r *PullSmsReplyStatusByPhoneNumberRequest) FromJsonString(s string) error
func (*PullSmsReplyStatusByPhoneNumberRequest) ToJsonString ¶
func (r *PullSmsReplyStatusByPhoneNumberRequest) ToJsonString() string
type PullSmsReplyStatusByPhoneNumberResponse ¶
type PullSmsReplyStatusByPhoneNumberResponse struct { *tchttp.BaseResponse Response *struct { // 回复状态响应集合 PullSmsReplyStatusSet []*PullSmsReplyStatus `json:"PullSmsReplyStatusSet,omitempty" name:"PullSmsReplyStatusSet" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewPullSmsReplyStatusByPhoneNumberResponse ¶
func NewPullSmsReplyStatusByPhoneNumberResponse() (response *PullSmsReplyStatusByPhoneNumberResponse)
func (*PullSmsReplyStatusByPhoneNumberResponse) FromJsonString ¶
func (r *PullSmsReplyStatusByPhoneNumberResponse) FromJsonString(s string) error
func (*PullSmsReplyStatusByPhoneNumberResponse) ToJsonString ¶
func (r *PullSmsReplyStatusByPhoneNumberResponse) ToJsonString() string
type PullSmsReplyStatusRequest ¶
type PullSmsReplyStatusRequest struct { *tchttp.BaseRequest // 拉取最大条数,最多100条 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` // 短信SdkAppid在[短信控制台](https://console.cloud.tencent.com/sms/smslist) 添加应用后生成的实际SdkAppid,示例如1400006666。 SmsSdkAppid *string `json:"SmsSdkAppid,omitempty" name:"SmsSdkAppid"` }
func NewPullSmsReplyStatusRequest ¶
func NewPullSmsReplyStatusRequest() (request *PullSmsReplyStatusRequest)
func (*PullSmsReplyStatusRequest) FromJsonString ¶
func (r *PullSmsReplyStatusRequest) FromJsonString(s string) error
func (*PullSmsReplyStatusRequest) ToJsonString ¶
func (r *PullSmsReplyStatusRequest) ToJsonString() string
type PullSmsReplyStatusResponse ¶
type PullSmsReplyStatusResponse struct { *tchttp.BaseResponse Response *struct { // 回复状态响应集合 PullSmsReplyStatusSet []*PullSmsReplyStatus `json:"PullSmsReplyStatusSet,omitempty" name:"PullSmsReplyStatusSet" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewPullSmsReplyStatusResponse ¶
func NewPullSmsReplyStatusResponse() (response *PullSmsReplyStatusResponse)
func (*PullSmsReplyStatusResponse) FromJsonString ¶
func (r *PullSmsReplyStatusResponse) FromJsonString(s string) error
func (*PullSmsReplyStatusResponse) ToJsonString ¶
func (r *PullSmsReplyStatusResponse) ToJsonString() string
type PullSmsSendStatus ¶
type PullSmsSendStatus struct { // 用户实际接收到短信的时间 UserReceiveTime *string `json:"UserReceiveTime,omitempty" name:"UserReceiveTime"` // 国家(或地区)码 NationCode *string `json:"NationCode,omitempty" name:"NationCode"` // 手机号码( e.164 标准) PurePhoneNumber *string `json:"PurePhoneNumber,omitempty" name:"PurePhoneNumber"` // 手机号码 PhoneNumber *string `json:"PhoneNumber,omitempty" name:"PhoneNumber"` // 本次发送标识 ID SerialNo *string `json:"SerialNo,omitempty" name:"SerialNo"` // 实际是否收到短信接收状态,SUCCESS(成功)、FAIL(失败) ReportStatus *string `json:"ReportStatus,omitempty" name:"ReportStatus"` // 用户接收短信状态描述 Description *string `json:"Description,omitempty" name:"Description"` }
type PullSmsSendStatusByPhoneNumberRequest ¶
type PullSmsSendStatusByPhoneNumberRequest struct { *tchttp.BaseRequest // 拉取起始时间,UNIX 时间戳(时间:秒) SendDateTime *string `json:"SendDateTime,omitempty" name:"SendDateTime"` // 偏移量 // 注:目前固定设置为0 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` // 拉取最大条数,最多 100 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` // 下发目的手机号码,依据 e.164 标准为:+[国家(或地区)码][手机号] ,示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。 PhoneNumber *string `json:"PhoneNumber,omitempty" name:"PhoneNumber"` // 短信SdkAppid在[短信控制台](https://console.cloud.tencent.com/sms/smslist) 添加应用后生成的实际SdkAppid,示例如1400006666。 SmsSdkAppid *string `json:"SmsSdkAppid,omitempty" name:"SmsSdkAppid"` }
func NewPullSmsSendStatusByPhoneNumberRequest ¶
func NewPullSmsSendStatusByPhoneNumberRequest() (request *PullSmsSendStatusByPhoneNumberRequest)
func (*PullSmsSendStatusByPhoneNumberRequest) FromJsonString ¶
func (r *PullSmsSendStatusByPhoneNumberRequest) FromJsonString(s string) error
func (*PullSmsSendStatusByPhoneNumberRequest) ToJsonString ¶
func (r *PullSmsSendStatusByPhoneNumberRequest) ToJsonString() string
type PullSmsSendStatusByPhoneNumberResponse ¶
type PullSmsSendStatusByPhoneNumberResponse struct { *tchttp.BaseResponse Response *struct { // 下发状态响应集合 PullSmsSendStatusSet []*PullSmsSendStatus `json:"PullSmsSendStatusSet,omitempty" name:"PullSmsSendStatusSet" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewPullSmsSendStatusByPhoneNumberResponse ¶
func NewPullSmsSendStatusByPhoneNumberResponse() (response *PullSmsSendStatusByPhoneNumberResponse)
func (*PullSmsSendStatusByPhoneNumberResponse) FromJsonString ¶
func (r *PullSmsSendStatusByPhoneNumberResponse) FromJsonString(s string) error
func (*PullSmsSendStatusByPhoneNumberResponse) ToJsonString ¶
func (r *PullSmsSendStatusByPhoneNumberResponse) ToJsonString() string
type PullSmsSendStatusRequest ¶
type PullSmsSendStatusRequest struct { *tchttp.BaseRequest // 拉取最大条数,最多100条 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` // 短信SdkAppid在[短信控制台](https://console.cloud.tencent.com/sms/smslist) 添加应用后生成的实际SdkAppid,示例如1400006666。 SmsSdkAppid *string `json:"SmsSdkAppid,omitempty" name:"SmsSdkAppid"` }
func NewPullSmsSendStatusRequest ¶
func NewPullSmsSendStatusRequest() (request *PullSmsSendStatusRequest)
func (*PullSmsSendStatusRequest) FromJsonString ¶
func (r *PullSmsSendStatusRequest) FromJsonString(s string) error
func (*PullSmsSendStatusRequest) ToJsonString ¶
func (r *PullSmsSendStatusRequest) ToJsonString() string
type PullSmsSendStatusResponse ¶
type PullSmsSendStatusResponse struct { *tchttp.BaseResponse Response *struct { // 下发状态响应集合 PullSmsSendStatusSet []*PullSmsSendStatus `json:"PullSmsSendStatusSet,omitempty" name:"PullSmsSendStatusSet" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewPullSmsSendStatusResponse ¶
func NewPullSmsSendStatusResponse() (response *PullSmsSendStatusResponse)
func (*PullSmsSendStatusResponse) FromJsonString ¶
func (r *PullSmsSendStatusResponse) FromJsonString(s string) error
func (*PullSmsSendStatusResponse) ToJsonString ¶
func (r *PullSmsSendStatusResponse) ToJsonString() string
type SendSmsRequest ¶
type SendSmsRequest struct { *tchttp.BaseRequest // 下发手机号码,采用 e.164 标准,+[国家或地区码][手机号] ,示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。最多不要超过200个手机号。 PhoneNumberSet []*string `json:"PhoneNumberSet,omitempty" name:"PhoneNumberSet" list` // 模板 ID,必须填写已审核通过的模板 ID。模板ID可登录[短信控制台](https://console.cloud.tencent.com/sms/smslist)查看。 TemplateID *string `json:"TemplateID,omitempty" name:"TemplateID"` // 短信SdkAppid在[短信控制台](https://console.cloud.tencent.com/sms/smslist) 添加应用后生成的实际SdkAppid,示例如1400006666。 SmsSdkAppid *string `json:"SmsSdkAppid,omitempty" name:"SmsSdkAppid"` // 短信签名内容,使用 UTF-8 编码,必须填写已审核通过的签名 // 签名信息可登录[短信控制台](https://console.cloud.tencent.com/sms/smslist) 查看。 Sign *string `json:"Sign,omitempty" name:"Sign"` // 模板参数,若无模板参数,则设置为空。 TemplateParamSet []*string `json:"TemplateParamSet,omitempty" name:"TemplateParamSet" list` // 短信码号扩展号,默认未开通,如需开通请联系 [sms helper](https://cloud.tencent.com/document/product/382/3773) ExtendCode *uint64 `json:"ExtendCode,omitempty" name:"ExtendCode"` // 用户的 session 内容,可以携带用户侧ID等上下文信息,server 会原样返回 SessionContext *string `json:"SessionContext,omitempty" name:"SessionContext"` // 国际/港澳台短信senderid,国内短信填空。 // 默认未开通,如需开通请联系 [sms helper](https://cloud.tencent.com/document/product/382/3773) SenderId *string `json:"SenderId,omitempty" name:"SenderId"` }
func NewSendSmsRequest ¶
func NewSendSmsRequest() (request *SendSmsRequest)
func (*SendSmsRequest) FromJsonString ¶
func (r *SendSmsRequest) FromJsonString(s string) error
func (*SendSmsRequest) ToJsonString ¶
func (r *SendSmsRequest) ToJsonString() string
type SendSmsResponse ¶
type SendSmsResponse struct { *tchttp.BaseResponse Response *struct { // 短信发送状态 SendStatusSet []*SendStatus `json:"SendStatusSet,omitempty" name:"SendStatusSet" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewSendSmsResponse ¶
func NewSendSmsResponse() (response *SendSmsResponse)
func (*SendSmsResponse) FromJsonString ¶
func (r *SendSmsResponse) FromJsonString(s string) error
func (*SendSmsResponse) ToJsonString ¶
func (r *SendSmsResponse) ToJsonString() string
type SendStatus ¶
type SendStatus struct { // 发送流水号 SerialNo *string `json:"SerialNo,omitempty" name:"SerialNo"` // 手机号码,e.164标准,+[国家或地区码][手机号] ,示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号 PhoneNumber *string `json:"PhoneNumber,omitempty" name:"PhoneNumber"` // 计费条数,计费规则请查询[计费策略](https://cloud.tencent.com/document/product/382/36135) Fee *uint64 `json:"Fee,omitempty" name:"Fee"` // 用户Session内容 SessionContext *string `json:"SessionContext,omitempty" name:"SessionContext"` // 短信请求错误码,具体含义请参考错误码 Code *string `json:"Code,omitempty" name:"Code"` // 短信请求错误码描述 Message *string `json:"Message,omitempty" name:"Message"` }
Click to show internal directories.
Click to hide internal directories.