smsconnector icon indicating copy to clipboard operation
smsconnector copied to clipboard

External API integration endpoints

Open goharahmed opened this issue 1 year ago • 1 comments

Hi Bill, This is more of a feature request. We often come across a scenario where external applications need to use the freePBX graphQL or REST interface to manage extensions, their authentications or even send/receive messages, on a user's behalf. It'd be useful if your module has API endpoints exposed for the world to use. Ofcourse need to be secured and authenticated.

Following could be useful: 1 - API endpoints to send a message out on behalf of a user. 2 - API endpoint to register a webhook for incoming messages on behalf of a user. 3 - Expiration & Refreshing mechanism for Auth Tokens for the above API endpoints 4 - Expiration & Refreshing mechanism for the message delivery webhooks 5 - [Good to Have] an API endpoint to just Authenticate incoming request with user credentials. Useful in scenarios where external Apps only need to check if the incoming request is valid or not and then perform any-other Operations.

|<-Specialized services (CRM etc)->|
[Exten/User]<=======>[External App]<-------------> [SMSConnector]<----->  SMS Vendors
                       ^
                       ||
                       ||
                        v
         [Third party services] 

Currently we provide a broker interface to do pretty much everything above but its not a freePBX module rather a standalone service; like an API wrapper for the freePBX Database mainly for Authentication purposes only. With your module we can offload messaging interconnectivity as well.

|<-Specialized services (CRM etc)->|
[Exten/User]<========>[External App]<-------------> [Broker: freePBXDB]
                       ^
                       ||
                       ||
                        v
         [Third party services] + SMS Vendors

I can provide some more details if you think your mode is the right place to do this.

Thanks, Gohar

goharahmed avatar Apr 03 '23 14:04 goharahmed