Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.34 KB

File metadata and controls

37 lines (29 loc) · 1.34 KB

SMS Tester

This service is meant to run as a GCP Cloud Function v2.

The purpose of the module is to prepare the data required in order to send SMS through the telecommunications api. It is supposed to be used for testing purposes only, to validate the format of an SMS.

Trigger

Calls through HTTPS allow for swift tests of an SMS from the webapp. Safety measures are implemented with CORS restrictions and Firebase token validations. The requests are supposed to be sent from confirmed domains in this project.

Execution

  1. Examines the HTTPS request.
  2. Validates the Firebase token.
  3. Retrieves the necessary data of the organization.
  4. Sends the SMS to the provided phone number with the message after validation.

Entrypoint

The entrypoint for the HTTPS request is in the main.py file. The function's name is send_test_sms.

Expected data of HTTPS

Expected format:

{
    "message": "String",
    "to": ["String"]  // Phone numbers
}

Environment variables

SINCH_REGION
SINCH_ENDPOINT
GCP_PROJECT
CORS