how can call rails service in vue

I just want to call the twilio serivce on < a > tag when click on verify number service should be call and check if number is valid then proceed next otherwise show error but i don’t know how can i do this.


def call(number, message)
  account_sid = ENV['TWILIO_ACCOUNT_SID']
  auth_token = ENV['TWILIO_AUTH_TOKEN']
  @client =, auth_token)
  message = @client.messages.create(body: message,from: ENV['TWILIO+NUMBER'],to: number)


 <li v-for:'number in phoneNumbers '>

  {{ number }}
    verify number

Source: Vue – Stack Overflow

November 10, 2021
Category : News
Tags: ruby | ruby-on-rails | twilio | twilio-api | Vue.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.