178
Views
1
Comments
Solved
Action in a Callback REST API
Question

Hi Community,

Context: "I am in charge of building a traditional web and it comes with an SMS function that is being dealt with by another engineering team. Right now the "sendSMS" has being set up and the user from my end is able to receive a text message from Outsystems. I would like the User to Acknowledge the message with an "OK" and it will trigger certain steps in my app such as changing the status of a ticket from "confirmed appointment" to "ready for appointment" etc." 

I was told to set up an API in my module and provide the API to the engineering team to do their magic. 

Would like to check if this is sufficient and what action should be inside the 'ReceiveSMS"? And how do I give API to my engineering team? Do I provide the URL?

2018-10-29 08-31-03
João Marques
 
MVP
Solution

Hi Alvin,


In m opinion, there is a couple of things you should consider:

  • Security: do you want this endpoint to be available to the whole world? Probably you want to ensure only the other team calls your service so you want to establish an authorization protocol. One of the most popular ways to ensure security in web services is using JWT (available on Forge here) which stands for JSON Web Token. It is an open, industry standard RFC 7519 method for representing claims securely between two parties. 
  • Output: do you want / need to inform the party if something went wrong (i.e. you cannot relate the mobile phone to the user)? If so, you might want to consider having output parameters like Success (boolean) and an Error structure with error code and error message.
  • Documentation: if you want to provide the whole documentation, you can use OutSystems to do that like on the image below (make sure you document the parameters so your consumers now exactly how to use your web services). This documentation will include the entrypoints, web methods verbs (POST, GET, PUT, etc.), inputs and outputs and its descriptions.

Hope it helps.


Cheers,

João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.