Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4k stars 540 forks source link

Feature Request: Add Telnyx as an SMS Provider #3306

Closed asasin114 closed 2 years ago

asasin114 commented 2 years ago

I've moved all of my voice and most of my SMS services over to Telnyx as they have been a phenomenal provider for us. They have a pretty great SMS application built with their API and webhooks. Was wondering there's a chance of getting them added as an SMS provider for 2-factor authentication?

I'd be willing to provide access to a number and account with Telnyx for testing if this is a possibility.

Here's a link to their example coding in Node for sending an SMS: https://developers.telnyx.com/docs/v2/messaging/quickstarts/sending-sms-and-mms?lang=node

VINISHVV commented 2 years ago

There are so many other providers are available in market. I think this not limited to particular providers we need to configure every sms providers api's.

Ylianst commented 2 years ago

Looking at this, it will take me 30 minutes to add... so adding it now.

Ylianst commented 2 years ago

MeshCentral v0.9.54 is out with Telnyx support. Once updated, put this in the config.json:

  "sms": {
    "provider": "telnyx",
    "apikey": "xxxxx",
    "from": "+1222222222"
  }

I did not try it with a valid account, I just tested it until it told me the authentication was not valid due to me using a dummy APIKEY, but it looks like it should work. Let me know if it works for you, I will put an announcement on Twitter about this.

Ylianst commented 2 years ago

Got my Twitter/Blog graphic ready...

MC2-Telnix

asasin114 commented 2 years ago

Perfect! I'll have it tested and reply back by the end of the day according to CST.

asasin114 commented 2 years ago

Works like a charm! One thing to note for anyone using Telnyx. You need to use the API V2 keys that Telnyx offers. API V1 will throw an authentication error.

asasin114 commented 2 years ago

Ran into a small problem. While I can send SMS messages from the console, it seems as though 2-factor codes are not sending properly. I just tried with 2 different accounts and am not receiving the codes. Is there something I can do to get you a log showing what's happening? The Server error log is empty.

Ylianst commented 2 years ago

Yes, go in the "My Server" / "Trace" tab and enable "Email / SMS" tracing. Then, send the SMS and see if you get any errors in the tracing log.

asasin114 commented 2 years ago

Oops, ignore me. With Telnyx, you have to submit a number to the API with a full E164 number (+1XXXXXXXXXX). I failed to insert the +1 on the numbers.