Skip to content

API for 360degree to send template based templates using WhatsApp

Notifications You must be signed in to change notification settings

mybooking-es/api360degree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Api360degree WhatsApp

Introduction

The purspose of this gem is to send text based template messages via 360 degrees

Please note that you cannot initiate a freetext message with WhatsappAPI. Instead, you must use a pre-approved template.

It is a Ruby port of https://github.com/chatwithio/php-360degree-template-message-send improved with header, footer and buttons parameters.

You can get full documentation from the following sources in order to improve the GEM

Getting a 360degree API Key

You can get one from here: https://tochat.be

Creating a template

The class support text based messages with header, body, footer parameters and buttons. It does not support images yet.

Thus, you can create a template in 360degree. Once the template has been approved you can start to use the starter pack.

Installation

Add this line to your application's Gemfile:

gem 'api-360degree'

And then execute:

$ bundle

Or install it yourself as:

$ gem install api-360degree

Usage

In order to use the gem you need an API key, a namespace and template.

  whatsapp_client = Api360degree::WhatsApp.new(MY_API_KEY)
  whatsapp_client.send_whats_app("phone_number",
                                 {"body" => ["Customer Name"],
                                 "new_order",
                                 "es",
                                 "MY_NAME_SPACE")

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/api-360degree.

About

API for 360degree to send template based templates using WhatsApp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages