Elixir and SMS tutorial

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • sms_demo

  • Check out the finished project on github at https://github.com/byronsalty/sms_demo

  • TextBelt

    Free API for outgoing SMS

  • # Path: lib/sms_demo/sms_handler.ex defmodule SmsDemo.SmsHandler do use GenServer def send_message(to_phone, message) do GenServer.cast(SmsDemo.SmsHandler, {:send, {to_phone, message}}) end def receive_message(from_phone, message) do GenServer.cast(SmsDemo.SmsHandler, {:receive, {from_phone, message}}) end def start_link(_) do GenServer.start_link(__MODULE__, [], name: __MODULE__) end def init([]) do {:ok, %{}} end def handle_cast({:send, {phone, message}}, state) do textbelt_url = "https://textbelt.com/text" textbelt_key = Application.get_env(:sms_demo, :textbelt_key) replyWebhookUrl = Application.get_env(:sms_demo, :webhook_url) params = %{ phone: phone, message: message, key: textbelt_key, replyWebhookUrl: replyWebhookUrl } HTTPoison.post(textbelt_url, Poison.encode!(params), [{"Content-type", "application/json"}]) {:noreply, state} end def handle_cast({:receive, {phone, message}}, state) do # TODO: Do something with the message {:noreply, state} end end

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts