Web Chat API

Connect with our Web Chat API, get insights into chat conversations, or communicate from your own software in real time.

  • HTTP API, Connect via HTTP using any programming language.
  • 99.9% SLA, We optimize the performance of all servers.
SMS API

Programming languages

Click on the programming language and access examples to integrate the Web Chat API with just copy and paste

API functionality

Get a list of active chat channels

API method that allows you to get a list of active chat channels.
Parameter Description Compulsory / Optional
class=chat Class requested: Class to which the request is made Compulsory
method=getchatchannels 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

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • list
      • platformid
      • platform
      • name
  • error (if status=error), here you will receive the error code

Error codes:

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

Parameters:

  • class : chat
  • method : getchatchannels
  • user : user
  • password : password

Request:

https://www.afilnet.com/api/http/?class=chat&method=getchatchannels&user=user&password=password

Send a message via chat

API method that allows you to chat message to a recipient.
Parameter Description Compulsory / Optional
class=chat Class requested: Class to which the request is made Compulsory
method=sendmessage 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
platform Platform to which the message is sent. Possible values: 'webchat', 'whatsapp', 'telegram', 'operator' Compulsory
platformid Platform identifier Compulsory
destination Recipient where the chat message is sent Compulsory
message Message to send via chat Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • error (if status=error), here you will receive the error code

Error codes:

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

Parameters:

  • class : chat
  • method : sendmessage
  • user : user
  • password : password
  • platform : whatsapp
  • platformid : 100
  • destination : 3460000000
  • message : test+message

Request:

https://www.afilnet.com/api/http/?class=chat&method=sendmessage&user=user&password=password&platform=whatsapp&platformid=100&destination=3460000000&message=test+message

Send a file via chat

API method that allows you to chat a file to a recipient.
Parameter Description Compulsory / Optional
class=chat Class requested: Class to which the request is made Compulsory
method=sendfile 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
platform Platform to which the message is sent. Possible values: 'webchat', 'whatsapp', 'telegram', 'operator' Compulsory
platformid Platform identifier Compulsory
destination Recipient where the file is sent Compulsory
type Type of file being sent. Possible values: 'image', 'video', 'audio', 'voice', 'document', 'contact' Compulsory
fileurl Url where the file to be sent by chat is located Compulsory
thumburl Url of the thumbnail image that accompanies the file Optional
message Message accompanying the file Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • error (if status=error), here you will receive the error code

Error codes:

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
INCORRECT_FILETYPE The file type is wrong, check the possible values
INCORRECT_FILEURL The file url is not valid
INCORRECT_THUMBURL The url of the thumbnail is invalid

Parameters:

  • class : chat
  • method : sendfile
  • user : user
  • password : password
  • platform : whatsapp
  • platformid : 100
  • destination : 3460000000
  • type : image
  • fileurl : https://www.example.com/image.jpg
  • thumburl : https://www.example.com/thumb.jpg
  • message : test+message

Request:

https://www.afilnet.com/api/http/?class=chat&method=sendfile&user=user&password=password&platform=whatsapp&platformid=100&destination=3460000000&type=image&fileurl=https://www.example.com/image.jpg&thumburl=https://www.example.com/thumb.jpg&message=test+message

Get a list of conversations in a chat

API method that allows you to get a list of conversations from a chat.
Parameter Description Compulsory / Optional
class=chat Class requested: Class to which the request is made Compulsory
method=getchats 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
platform Platform to which the message is sent. Possible values: 'webchat', 'whatsapp', 'telegram', 'operator' Compulsory
platformid Platform identifier Compulsory

Answer:

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

Error codes:

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 : chat
  • method : getchats
  • user : user
  • password : password
  • platform : whatsapp
  • platformid : 100

Request:

https://www.afilnet.com/api/http/?class=chat&method=getchats&user=user&password=password&platform=whatsapp&platformid=100

Get list of messages from a chat

API method that allows you to get the list of messages from a chat.
Parameter Description Compulsory / Optional
class=chat 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
platform Platform to which the message is sent. Possible values: 'webchat', 'whatsapp', 'telegram', 'operator' Compulsory
platformid Platform identifier Compulsory
destination Recipient from which you want to obtain the messages Compulsory

Answer:

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

Error codes:

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 : chat
  • method : getmessages
  • user : user
  • password : password
  • platform : whatsapp
  • platformid : 100
  • destination : 34600000000

Request:

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

Get a list of unread messages from a chat

API method that allows you to get the list of unread messages from a chat.
Parameter Description Compulsory / Optional
class=chat Class requested: Class to which the request is made Compulsory
method=getunreadmessages 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
platform Platform to which the message is sent. Possible values: 'webchat', 'whatsapp', 'telegram', 'operator' Compulsory
platformid Platform identifier Compulsory
destination Recipient from which you want to obtain the messages Compulsory

Answer:

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

Error codes:

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 : chat
  • method : getunreadmessages
  • user : user
  • password : password
  • platform : whatsapp
  • platformid : 100
  • destination : 34600000000

Request:

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

Tools that enhance our Web Chat API

SECURE API CONNECTION

SECURE API CONNECTION

Security tailored to your business

Configure your API connections, create new accesses and manage existing ones.

Filter all API accesses by IP, add or remove enabled IPs to guarantee the security of your accesses.

Keep track of all connections made, API used and connection dates / time

MULTIPLE APIs

MULTIPLE APIs

Connectivity tailored to your business

We offer you multiple APIs to connect with us, we have an HTTP API, BASIC AUTH, SOAP and JWT Authentication so that you can connect with us the way you want.

Connect with any of the APIs in a secure, simple and centralized way . Afilnet API is perfect for your software.

API Logs

API Logs

Get to know each request in detail

Thanks to our logs you will be able to review all the requests made and the corresponding response from our API, which will allow you to consult details when you need them.

The information you can consult is the following:

  • Source IP of the request
  • Date & Time of the request
  • API & Method being called
  • Parameters sent to the API
  • API response
  • metadata

Steps to use the Web Chat API

Getting started with the Web Chat API will only take a few minutes

01

Request your free trial

You must be a registered user in Afilnet in order to have access to the Web Chat API. Sign up in a few minutes.

02

Integrate the Web Chat API

Integrate with the Web Chat API using the code we provide for your favorite programming language.

03

Request your free trial

We will offer you free credit so you can try the Web Chat service before you buy.

04

Welcome to Afilnet!

Everything ready!, has managed to improve its communications with Afilnet. We are here to support our API when you need it

Try Afilnet for free!

Sign up for free and try Afilnet! We offer you a free trial of our services. *



(*) Promotion only valid for companies that have never used the Afilnet service before. When requesting the free balance, Afilnet may request to verify your company information


Bulk SMS · Email Marketing · Social network · Instant messaging · Certification · and much more
Continue 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.
Payment methods
Wire transfer
Credit card
Paypal
Western Union
Skrill
Crypto
Afilnet in your language

Copyright © 2024 Afilnet · All rights reserved