This video shows how to invoke a REST API from the Server Code script. There are a number of benefits to invoke a REST API from the server instead of directly from the client:
- JavaScript is the language used to write the script
- Additional business logic can be added around the API. For example, in addition to sending an SMS, you can also send an email (SendGrid API)
- The API keys and tokens are secure
- Script is exposed via REST API (to be invoked from the app)
- Script has API to access Appery.io Database, Push
- A script can be saved as a library and used in other scripts
- Script changes can be made without updating the client (app)
Leave a Reply