You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is my code to validate incoming SMS requests.
At first I thought it was user error on my part, but after checking the stack trace, the strings that RequestValidator are comparing to each other are the exact same. Yet it still returns false.
Is this a known issue with RequestValidator, or am I doing something wrong?
defmodule GrowgladWeb.Hooks.MessagesController do
use GrowgladWeb, :controller
def receive(conn, params) do
url = "https://api.growglad.com/hooks/messages/receive"
token = Application.get_env(:ex_twilio, :auth_token)
signature = List.to_string(get_req_header(conn, "x-twilio-signature"))
if ExTwilio.RequestValidator.valid?(url, params, signature, token) do
IO.inspect("The text is valid!")
Honeydew.async({:receive_sms, [params]}, :queue)
else
IO.inspect("The text is invalid!")
end
end
end
Ps. Big fan of your learnelixir.tv and learnphoenix.tv websites! That's how I learned/am learning!
The text was updated successfully, but these errors were encountered:
@jacobwarren this is not a known issue with RequestValidator as far as I am aware. I am adding this to my calendar to look into in the next few days. In the meantime, did you discover anything new since you posted this that might help?
Below is my code to validate incoming SMS requests.
At first I thought it was user error on my part, but after checking the stack trace, the strings that RequestValidator are comparing to each other are the exact same. Yet it still returns false.
Is this a known issue with RequestValidator, or am I doing something wrong?
Ps. Big fan of your learnelixir.tv and learnphoenix.tv websites! That's how I learned/am learning!
The text was updated successfully, but these errors were encountered: