test-verify-sms.js 614 B

1234567891011121314151617181920
  1. const { AuthenticationClient, Models } = require('authing-node-sdk');
  2. const authenticationClient = new AuthenticationClient({
  3. // 需要替换成你的 Authing AppId、 Secret 和 Host
  4. appId: '6682ab96b7bd5db59d6785a0',
  5. appSecret: "4cfc095a72a67e22065c97e90054315c",
  6. appHost: 'https://textbook.u2-dev.hep.com.cn', // 应用的认证地址
  7. });
  8. (async () => {
  9. const result = await authenticationClient.sendSms({
  10. phoneNumber: '18607007073',
  11. channel: Models.SendSMSDto.channel.CHANNEL_IDENTITY_VERIFICATION,
  12. phoneCountryCode: '+86'
  13. });
  14. console.log(JSON.stringify(result, null, 2));
  15. })();