|
@@ -0,0 +1,20 @@
|
|
|
+const { AuthenticationClient, Models } = require('authing-node-sdk');
|
|
|
+
|
|
|
+const authenticationClient = new AuthenticationClient({
|
|
|
+ // 需要替换成你的 Authing AppId、 Secret 和 Host
|
|
|
+ appId: '6682ab96b7bd5db59d6785a0',
|
|
|
+ appSecret: "4e978331675938d1bc81fb109e67d59a",
|
|
|
+ appHost: 'https://textbook.u2-dev.hep.com.cn', // 应用的认证地址
|
|
|
+});
|
|
|
+
|
|
|
+(async () => {
|
|
|
+
|
|
|
+ const result = await authenticationClient.sendSms({
|
|
|
+ phoneNumber: '18607007073',
|
|
|
+ channel: Models.SendSMSDto.channel.CHANNEL_IDENTITY_VERIFICATION,
|
|
|
+ phoneCountryCode: '+86'
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ console.log(JSON.stringify(result, null, 2));
|
|
|
+})();
|