sms-server could send a custom length verification code
https://market.aliyun.com/products/57000002/cmapi00039249.html 测试模板: M09DD535F4
https://market.aliyun.com/products/56928004/cmapi023305.html 测试模板: TP1711063
1.select smsProvider 选择短信 API 服务商,目前支持 tianyan 和 dingxin,记录供应商名称(全部小写),之后会用到
2.进入云市场购买产品,购买完之后申请模板,记录 templateCode 和 appCode, eg:
3.调用 API
client := api.NewClient([smsProvider], [appCode], [templateCode])
err := client.Send([phone_number], 6)
if err != nil {
log.Println(err)
}
To see how the specification has been applied, see the API directory.
To see how the specification has been applied, see the Examples directory.
package main
import (
"log"
"github.com/my-Sakura/go-sms-server/api"
)
func main() {
client := api.NewClient("tianyan", [appCode], "M09DD535F4")
err := client.Send([phone_number], 6)
if err != nil {
log.Println(err)
}
}
MIT © my-Sakura ❤️ ⭐ ✨ 💫