10.84

v 13.0 Third Party 2
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 258
Technical Name whatsapp_local_api
LicenseAGPL-3
Websitehttps://odoonext.com
Versions 16.0 12.0 13.0 14.0 15.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 258
Technical Name whatsapp_local_api
LicenseAGPL-3
Websitehttps://odoonext.com
Versions 16.0 12.0 13.0 14.0 15.0 17.0

API de WhatsApp for Odoo

Discover the ultimate module that allows you to send WhatsApp messages without relying on external APIs or third-party services!

With the purchase of this amazing module, you will get your own customized API, ready to be executed on your server.

The Local WhatsApp API for Odoo is a flexible and powerful solution that enables you to send and receive WhatsApp messages directly from your Odoo instance. Unlike the official WhatsApp API, this local API has been specifically designed to integrate with existing modules in the Odoo store, as well as your own custom modules. With this API, you can leverage the popularity and extensive functionality of WhatsApp to enhance communication with your customers and business partners. You can send text messages, images, videos, and documents through WhatsApp from any Odoo module that requires quick and efficient interaction. Furthermore, the Local WhatsApp API for Odoo allows you to receive incoming messages and process them automatically. This is particularly useful if you want to implement an intelligent chatbot in your enterprise management system or if you need to create automated responses to frequently asked questions. Integrating the Local WhatsApp API into Odoo is straightforward and offers a high level of customization. You can adapt outgoing messages and incoming responses according to your specific needs, enabling you to provide a personalized user experience and enhance efficiency in your daily operations. Our Local WhatsApp API for Odoo is based on standard protocols like HTTP, making it easy to integrate with other Odoo modules and applications. Additionally, it comes with comprehensive documentation, code examples, and dedicated technical support to assist you in successful implementation within your Odoo environment. Take advantage of all the benefits of WhatsApp and elevate your Odoo instance to the next level of communication with the Local WhatsApp API. Start sending and receiving WhatsApp messages efficiently and with personalization in Odoo right away!

Important!!!!!

This module is not a COPY of any module in the store. This API runs on a separate server and utilizes Node.js and Express.js to provide seamless integration with your Odoo modules.

OdooNext

Visit us:
https://odoonext.com

Server

Description

Imagine the freedom of being able to send and receive WhatsApp messages without paying for expensive additional services.With a single payment, this module will provide you exclusive access to a powerful API that can be easily integrated with other modules from the Odoo store or your own custom implementations


No more limitations or unnecessary expenses. With this self-owned API, you can fully leverage all the functionalities of WhatsApp and maintain complete control over your communications. Forget about restrictions and make the most of this unique opportunity to acquire a module that empowers you to send and receive WhatsApp messages independently. Don't wait any longer; get your module today!


Key features:
  • Send and receive WhatsApp messages
  • Integrate with other modules in the Odoo store
  • Customize and personalize message content
  • Manage contact lists and groups
  • Schedule message sending
  • Receive real-time message notifications
  • Support for multimedia messages (images, videos, audio)
  • Track message delivery status
  • Handle incoming message callbacks
  • Manage message templates
  • Secure and encrypted communication
  • Easy-to-use API documentation
  • Seamless integration with your own implementations
  • One-time payment for unlimited access

Settings

  1. Install Node.js on your server
  2. Navigate to the directory where the Odoo module is located
  3. Install the required dependencies using npm install
  4. Configure the API settings in the config.json file
  5. Start the Express.js server and listen for requests on the desired port
  6. Configure the webhook URL in the WhatsApp Business API settings
  7. Test the API using tools like Postman or cURL
  8. Deploy the application on your server
  9. Perform thorough testing and ensure the API works correctly


API Endpoints

Endpoint Description Method
/ Root endpoint GET
/image/:filename Endpoint to retrieve an image GET
/ Endpoint to send a message or configure settings POST

Root Endpoint - GET /

This endpoint is used to get the status or generate a QR code for authentication.

Headers:

  • Action: status_get

Response:

  • If the action is status_get and the client is ready, it returns the status code 200 and a JSON object with the status information.
  • If the client is not ready, it generates a QR code and returns the status code 200 along with the generated QR code as a base64 string.

Image Endpoint - GET /image/:filename

This endpoint is used to retrieve an image by specifying the filename in the URL.

Parameters:

  • filename (string): The name of the image file to retrieve.

Response:

  • If the image is found, it returns the image data with the appropriate content type.
  • If the image is not found, it returns the status code 500 along with an error message.

Root Endpoint - POST /

This endpoint is used to send a message or configure settings.

Headers:

  • Action: send or config_set

Send Message

Body:

  • type (string): The type of message (e.g., image, file, text).
  • text (string): The text content of the message.
  • filename (string): The filename of the media (if applicable).
  • url (string): The URL of the media file (if applicable).
  • to (string): The recipient of the message.
  • id (string): The ID of the message.

Response:

  • If the message is sent successfully, it returns the status code 200 along with the message ID.
  • If there is an error sending the message, it returns the status code 500.

Configure Settings

Body:

  • webhook: URL of the webhook to receive events.
  • info: Object containing configuration information (e.g., odoo_url, lang, phone, website, currency, country, name, email).

Response (200 OK):

                        {
                          "status": {
                            "status_code": 200,
                            "accountStatus": "config set"
                          }
                        }
                        

Response (500 Internal Server Error):

                        {
                            "status": {
                                "status_code": 500,
                                "accountStatus": "config not set"
                            }
                        }
                        

Test API

POST /

This endpoint is used to send WhatsApp messages. You need to provide the "send" action in the request headers and the message data in the request body. Here's an example:

POST / HTTP/1.1
Host: your-server.com
Action: send
Content-Type: application/json

{
    "type": "text",
    "text": "Hello, how are you?",
    "to": "recipient-number"
}
    

The server will respond with a status code of 200 and a JSON object containing the ID of the sent message.

Python Code Example


import requests
import json
from flask import Flask, request

app = Flask(__name__)

def send_whatsapp_message(to, message):
    url = "http://localhost:3000/"
    headers = {'Content-Type': 'application/json', 'action': 'send'}
    data = {
        'type': 'text',
        'text': message,
        'to': to
    }
    response = requests.post(url, headers=headers, data=json.dumps(data))
    if response.status_code == 200:
        print("Message sent successfully")
    else:
        print("Failed to send message")

# Example usage
send_whatsapp_message("1234567890", "Hello, how are you?")


@app.route('/webhook', methods=['POST'])
def receive_message():
    data = request.get_json()
    message = data['message']
    sender = data['sender']
    # Process the received message
    print(f"Received message from {sender}: {message}")
    # You can perform any desired actions with the received message here
    # For example, you can send an automated reply

    return 'Message received'  # Return a response to the sender

if __name__ == '__main__':
    app.run(debug=True)

    

A WhatsApp API client that connects through the WhatsApp Web browser app It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked. NOTE: I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.



Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.