Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Sends WhatsApp messages and manages templates, WABAs, and phone numbers through the Telnyx WhatsApp Business API in Ruby.
45% 100%+55 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 10 of 22 without it.
Write a Ruby code snippet using the Telnyx SDK to send a direct customer service text response to a user who messaged our WhatsApp line 2 hours ago. Assume Telnyx is already initialized.
Calls client.messages.send_whatsapp
3 of 3 safety checks passed
gem install telnyx
require "telnyx"
client = Telnyx::Client.new(api_key: ENV["TELNYX_API_KEY"])
All examples below assume client is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
begin
response = client.messages.send_whatsapp(
from: "+19452940762",
to: "+18005551234",
type: "WHATSAPP",
whatsapp_message: {
type: "text",
text: { body: "Hello from Telnyx!" }
}
)
rescue Telnyx::APIError => e
puts "API error: #{e.http_status} - #{e.message}"
rescue Telnyx::AuthenticationError
puts "Invalid API key"
rescue Telnyx::RateLimitError
puts "Rate limited - retry with backoff"
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.