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.
API functionality
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
-
list
- 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:
Send a message via chat
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:
Send a file via chat
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:
Get a list of conversations in 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
-
list
- 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:
Get 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
-
list
- 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:
Get a 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
-
list
- 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:
Tools that enhance our Web Chat API
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
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
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
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.
Integrate the Web Chat API
Integrate with the Web Chat API using the code we provide for your favorite programming language.
Request your free trial
We will offer you free credit so you can try the Web Chat service before you buy.
Welcome to Afilnet!
Everything ready!, has managed to improve its communications with Afilnet. We are here to support our API when you need it