Help Desk
  • Getting Started
    • ๐Ÿ™ŒWelcome to Whapi.Cloud
    • ๐Ÿ’ฐPricing
    • โ˜•Partners
    • ๐Ÿš€Getting started
    • ๐Ÿ‘จโ€๐Ÿ’ปAPI Docs
      • Developer hubs
      • Swagger environment
      • Postman collection
  • Sending
    • Introduction
    • Send text message
      • Whatsapp API send message PHP
      • Whatsapp API send message Python
      • Whatsapp API send message Node JS
      • Whatsapp API send message ะก#
      • Whatsapp API send message Java
      • API integration with VB6
      • Whatsapp API send message GO (Golang)
    • Send video, audio, image, document
    • Send Group message
    • Send post to WhatsApp Channel
    • Send message with Buttons
    • Send Emoji
    • Overview of other methods for sending
      • Send Voice message
      • Send contact (vCard)
      • Send message reactions
  • Receiving
    • Introduction
    • Webhooks
      • Our webhooks (Tracked events)
      • Where to Find the Webhook URL?
      • Set the webhook link to the channel
      • Detailed webhook settings
      • How to check the webhook?
      • Incoming webhooks format
        • Incoming message
        • Sent message
        • Chats
        • Groups
        • Account and device status
        • Other
          • Presences
          • Views of stories (statuses)
          • Story (status) from your contacts
          • Calls
      • Receive messages
        • Receive WhatsApp messages using PHP
        • Receive WhatsApp messages using Node js
        • Receive WhatsApp messages using Python
    • HTTP API
      • Retrieve a Specific User's Chat History
      • Get a full-size picture in the response
      • Get order items
      • Get a profile picture of a chat or user
    • File expiration period
  • Groups
    • Send Group message
      • Mentioning all participants in a WhatsApp group
    • Get list of group members
    • Add new member to Group
  • Channels
    • Send post to WhatsApp Channel
    • Get messages from Channels
    • Get votes from polls in the Channel
  • Communities
    • Introduction
    • Create a community
    • Add a member to a community
    • Send announcement
    • Get info on community participants
    • Add a group / Exclude a group from the community
  • Account
    • Setting "Auto Download"
    • Customizable Webhook Headers
    • How to find out the IP channel
    • How to Delete a Channel
    • Add Business Info to Invoice
  • Source code
    • WhatsApp ChatBot
      • WhatsApp Python Bot
      • WhatsApp PHP Bot
      • WhatsApp Node JS Bot
      • WhatsApp Java Bot
    • WhatsApp API Google Sheets
    • WhatsApp Phone Number Checker
    • Request Distributor (Balancer)
  • FAQ
    • Chat ID. What is it and how to get it?
    • Current status of Buttons on WhatsApp
    • How to send a paragraph (line break)
    • Inactive Links in WhatsApp Messages
    • WhatsApp Text Formatting
    • Checking if the number has Whatsapp
    • Specifics of sending messages to numbers of different countries
    • Why aren't participants being added to the group?
  • Does WhatsApp API Work with the Phone Turned Off?
  • Hints
    • Android Emulators
    • Virtual Numbers for WhatsApp
    • How to use polls as buttons?
    • How to check who blocked you in Whatsapp?
    • Setting up a WhatsApp proxy
  • Integrations
    • Make.com
      • Ready-Made Scenarios
        • WhatsApp & Whisper API: Voice-to-Text Integration
        • Automated WhatsApp Group Message Forwarding in Make.com
      • Request Scenario Setup
    • Pabbly Connect
    • Google Contacts
    • DialogFlow
    • n8n
  • Tools
    • WhatsApp Number Checker
    • Automatic warm-up module
    • WhatsApp Activity Safety Meter
    • Residential Proxies from Whapi.Cloud
  • Troubleshooting
    • Couldn't Link Device โ€“ WhatsApp QR Code or Pairing Code Fails
    • Channel status โ€œSYNC_ERRORโ€
    • Not getting a READ status on webhook
    • 429 (Too Many Requests) - Soft Ban
    • โ€œWaiting for this message. This may take a whileโ€ โ€“ WhatsApp Message Error
    • Missing push notifications after connecting to API
  • Blocking
    • How to not get Banned?
    • How to do mailings without the risk of being blocked?
    • If My Number Is Banned, Can It Be Restored?
    • Unlocking Your WhatsApp Number
    • Connecting a New WhatsApp Number After a Ban: Steps and Recommendations
    • Warming Up New Phone Numbers for WhatsApp API
  • Partner Documentation
    • Introduction
    • Partner Dashboard Overview
    • Partner Program Guidelines
      • Workflow: Step-by-Step
      • Billing for Partners
      • Allocating Days to Customer Channels: Best Practices & Guide
      • Interface for channel management
    • Partner Documentation
      • Channel creation
      • Changing channel mode
      • Channel extension
      • Channel deletion
      • Getting the list of channels
      • Notices of end of days on balance
Powered by GitBook
On this page
  • Authentication
  • How to Send WhatsApp API Message using VB6
  • Send Media Message
  • Send Document
  • Send Audio
  • Send Voice
  • Send Video
  • Send GIF
  • Send Contact
  • Send Contact List
  • Send Location
  • Send Sticker

Was this helpful?

  1. Sending
  2. Send text message

API integration with VB6

How to Send a Message by WhatsApp API using VB6

PreviousWhatsapp API send message JavaNextWhatsapp API send message GO (Golang)

Last updated 9 months ago

Was this helpful?

Authentication

The first step is to register on the and create an account. It's free and doesn't require you to enter a credit card.

After registration you will immediately have access to a test channel with a small limitation. Wait for it to start (it usually takes about a minute). You will need to connect your phone for Whatsapp automation. It is from the connected phone that messages will be sent.

The big advantage of the service is that it takes only a couple of minutes to launch and start working.

Open your WhatsApp mobile app, navigate to Settings -> Linked devices -> Link a device -> Scan QR code

Our service enables you to interact with the API without the need for an uninterrupted phone connection. Operate WhatsApp on up to four paired devices and one mobile device concurrently.

Now save the generated API-Key token on channel page:

How to Send WhatsApp API Message using VB6

Private Sub SendMessage()
    Dim xml As Object
    Dim strNumber As String, strMessage As String
    Set xml = CreateObject("MSXML2.ServerXMLHTTP.6.0")
   
    Dim url As String
    url = "https://gate.whapi.cloud/messages/text"
   
    Dim apiKey As String
   
    apiKey = "Your API Key Goes Here"
    strNumber = "Recipient Number"  'Number should be in format countrycode+mobilenumber without + sign
   
    strMessage = "This is My First Message"
   
    Dim jsonBody As String
   
    jsonBody = "{""to"":""" & strNumber & """,""body"":""" & strMessage & """}"
   
    With xml
        .Open "POST", url, False
        .setRequestHeader "Authorization", "Bearer " & apiKey
        .setRequestHeader "Content-Type", "application/json"
        .send jsonBody
    End With
   
   
    If xml.Status = 200 Then
        MsgBox "Message sent successfully: " & xml.responseText
    Else
        MsgBox "Error: " & xml.Status & " - " & xml.statusText & vbCrLf & xml.responseText
    End If
   
    Set xml = Nothing
End Sub

We offer a convenient service for testing requests and using ready-made code fragments in any programming language. You will only need to transfer the saved API-token and fill in the required parameters:

  • 'to': The recipientโ€™s WhatsApp number with international format e.g., 14409416972 or chatID for contact or group e.g 14409416972@s.whatsapp.net or 1203234567890@g.us

  • 'body' : Message text.

Please note that this is a basic example and doesn't include any error handling. For a production environment, ensure to add appropriate error and exception handling.

In our comprehensive documentation, you'll discover step-by-step instructions and examples for utilizing methods that empower you to send diverse content, ranging from files of any format, locations, and contacts to stickers and in-message buttons.

Moreover, you can interact dynamically with emoji messages by quoting, marking them as read, or simulating real-time typing.

Furthermore, you can efficiently manage your groups by changing avatars, renaming them, inviting new members, or blocking unwanted users.

Send Media Message

Please don't hesitate to reach out to share your experiences or pose any questions you might have.

Send Document

Send Audio

Send Voice

Send Video

Send GIF

Send Contact

Send Contact List

Send Location

Send Sticker

You can Send a ppt audio recording to the phone number or group, But WhatsApp is sensitive to this extension, you need to be in OGG format and the codecs should be the opus. Our API has an automatic video and audio converter for the necessary codecs compatible with WhatsApp. For more information, you can check out this .

Get Started Free
Get Started Free
article
Whapi.Cloud website
Logo๐Ÿ’ฌ Send text messageWhapi Cloud - Whatsapp API for developers
Logo๐Ÿ–ผ Send media-image messageWhapi Cloud - Whatsapp API for developers
Logo๐Ÿ“‘ Send media-document messageWhapi Cloud - Whatsapp API for developers
Logo๐ŸŽต Send media-audio messageWhapi Cloud - Whatsapp API for developers
Logo๐ŸŽค Send media-voice messageWhapi Cloud - Whatsapp API for developers
Logo๐ŸŽฅ Send media-video messageWhapi Cloud - Whatsapp API for developers
Logo๐ŸŽฌ Send media-gif messageWhapi Cloud - Whatsapp API for developers
Logo๐Ÿ‘ค Send contact messageWhapi Cloud - Whatsapp API for developers
Logo๐Ÿ‘ฅ Send contact list messageWhapi Cloud - Whatsapp API for developers
Logo๐Ÿ“ Send location messageWhapi Cloud - Whatsapp API for developers
Logo๐ŸŽญ Send media-sticker messageWhapi Cloud - Whatsapp API for developers
Pair any number
Grab your token
Paste your API token and parameters, then copy code snippet