An API to send a text message via email/WhatsApp/sms on a specific time
- POST
/api/wa - POST
/api/sms - POST
/api/email
It can have four parameters -
{
"message": "hello cueme :3",
"phone": "+919876543210",
"email": "joe@mama.com",
"time": "2021-07-25T15:59:59.000Z",
}phoneoremailcan be omitted if it's not required by the medium. (Eg:api/smsdoesn't require theemailfield)timeis in RFC3339 format and is an optional field.
-
Make sure you have Go installed
-
Get the code
git clone https://github.com/krispykalsi/cueme.git cd cueme -
Create a file named
.env.secretand copy this data in it. Replace the values with your keysTWILIO_PHONE_AUTH_USERNAME=BCa1f7845a336f6492a8a90bbe5b763602 TWILIO_PHONE_AUTH_PASSWORD=c9757b0fc7fef40774fff78d5f67ce53 TWILIO_MSG_SERVICE_SID=MGd438c79dd721034c44c249edfa4ce96b TWILIO_WA_PHONE_NO=+14155238886 TWILIO_MSG_API_ENDPOINT=https://api.twilio.com/2010-04-01/Accounts/ACf1f7845a336f6492a8a90bbe5b763602/Messages.json TWILIO_EMAIL_AUTH_KEY=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 TWILIO_VERIFIED_EMAIL=joe@mama.com
-
Download dependencies
go mod download
-
Build the server
go build ./cmd/cueme-server
-
Run and access through
http://localhost:8080- Windows
cueme-server.exe
- Unix
./cueme-server
