Get a list of WhatsAPP messages with SQL Server

Get a list of WhatsAPP messages with SQL Server

SQL Server : API DOCUMENTATION



Get a list of WhatsAPP messages with SQL Server

Example in SQL Server:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO
DECLARE @class varchar(500) = 'whatsapp';
DECLARE @method varchar(500) = 'getmessages';
DECLARE @user varchar(500) = 'user';
DECLARE @password varchar(500) = 'password';
DECLARE @platformid varchar(500) = '100';
DECLARE @destination varchar(500) = '34600000000';
DECLARE @url varchar(255) = 'https://www.afilnet.com/api/http/?class='+@class+'&method='+@method+'&user='+@user+'&password='+@password+'&platformid='+@platformid+'&destination='+@destination;
DECLARE @win int
DECLARE @hr  int
DECLARE @text varchar(8000)

EXEC @hr=sp_OACreate 'WinHttp.WinHttpRequest.5.1',@win OUT
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAMethod @win, 'Open',NULL,'GET',@url,'false'
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAMethod @win,'Send'
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAGetProperty @win,'ResponseText',@text OUTPUT
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OADestroy @win
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win



See example in:

Get a list of WhatsAPP messages with PHP Get a list of WhatsAPP messages with Java Get a list of WhatsAPP messages with C Sharp Get a list of WhatsAPP messages with Unix Get a list of WhatsAPP messages with Ruby on rails Get a list of WhatsAPP messages with Python Get a list of WhatsAPP messages with Android Get a list of WhatsAPP messages with Objective C / iPhone Get a list of WhatsAPP messages with SQL Server Get a list of WhatsAPP messages with Oracle Get a list of WhatsAPP messages with Node JS Get a list of WhatsAPP messages with Go lang Get a list of WhatsAPP messages with Scala lang Get a list of WhatsAPP messages with Swift Get a list of WhatsAPP messages with Delphi



Method details

Parameter Description Compulsory / Optional
class=whatsapp Class requested: Class to which the request is made Compulsory
method=getmessages Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
platformid Platform identifier Compulsory
destination Recipient from which you want to obtain the messages Compulsory

When you make requests you will receive the following fields:


  •  status
  •   result (if status=success), here you will receive the following values:
    • list
      • platformid
      • message
      • destination
      • messageid
      • sent
      • status
      • datetime
  • error (if status=error), here you will receive the error code

The possible error codes are listed below


Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method
CHANNEL_NOT_FOUND The indicated channel does not exist
CHAT_NOT_FOUND The indicated chat does not exist
Parameters:
  • class : whatsapp
  • method : getmessages
  • user : user
  • password : password
  • platformid : 100
  • destination : 34600000000

Request:
https://www.afilnet.com/api/http/?class=whatsapp&method=getmessages&user=user&password=password&platformid=100&destination=34600000000




Connect SQL Server with our WhatsAPP Business API

Our WhatsAPP Business API allows you Get a list of WhatsAPP messages with SQL Server in a simple, fast and efficient way. The process you must follow in order to use our API will only take a few minutes. Our company will offer you a free trial so that you can test the service.


Steps to follow

  • Register as a client on Afilnet.
  • Request a test or top up your balance.
  • Start using the API with your registration data (data that you must include in the "user" and "password" fields) or by creating new API credentials from your Afilnet account.

Get started now with the Afilnet API!




Do you have any questions or problems in the integration?


Contact our team with any questions through the contact methods that we offer. Our team will try to offer you an immediate solution and will help you in the integration of our API in your Software.



Try Afilnet for free!

You are just one step away from changing your company's communication forever, from today you will capture and retain your customers better thanks to Afilnet services.

Bulk SMS · Email Marketing · Social network · Instant messaging · Certification · and much more

Register in 1 minute

Register for free and try Afilnet today *



(*) Promotion only valid for companies that have never used the Afilnet service before, only free credit is provided for SMS and Email Marketing services. When requesting the free balance, Afilnet may contact you to verify your company information

IMPORTANT INFORMATION ABOUT COOKIES: If you continue to use this web we will assume that you accept the terms of use. You will find more information in our Cookies Policy. Continue

Payment methods

  • Wire transfer
    Credit card
    Paypal
    Western Union

Afilnet in your language

Afilnet EspañaAfilnet United KingdomAfilnet FranceAfilnet DeutschlandAfilnet ItaliaAfilnet PortugalAfilnet 中国Afilnet 日本Afilnet الإمارات العربية المتحدةAfilnet EstoniaAfilnet PolskaAfilnet РоссияAfilnet TürkiyeAfilnet Česká republikaAfilnet ΕλλάδαAfilnet SverigeAfilnet DanmarkAfilnet România

Copyright © 2021 Afilnet · All rights reserved