msg logo
ruby icon

how to send whatsApp messages using api ruby

send whatsapp messages easily using api and start in minutes.

Full code
require 'net/http' require 'json' uri = URI('https://api.sendmsg.dev/message/batch') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri) request.body = { to: ['+1234567890', '+0987654321'], message: 'Hello from MSG!', # token: 'YOUR_API_TOKEN' # Optional, gives full access }.to_json response = http.request(request) result = JSON.parse(response.body)
Other available languages