ryanemax пре 9 месеци
родитељ
комит
c07b321909
1 измењених фајлова са 20 додато и 0 уклоњено
  1. 20 0
      server/cloud/authing/test/test-verify-sms.js

+ 20 - 0
server/cloud/authing/test/test-verify-sms.js

@@ -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));
+})();