All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
send_message_controller_send_audio_message | POST /rest/sendMessage/{instance_key}/audio | Send an audio to an WhatsApp User |
send_message_controller_send_buttons_message | POST /rest/sendMessage/{instance_key}/templateMessage | Send an interactive template message to an WhatsApp User |
send_message_controller_send_buttons_message_with_media | POST /rest/sendMessage/{instance_key}/templateMessageWithMedia | Send an interactive template message with mediaHeader to an WhatsApp User |
send_message_controller_send_document_message | POST /rest/sendMessage/{instance_key}/document | Send an document to an WhatsApp User |
send_message_controller_send_image_message | POST /rest/sendMessage/{instance_key}/image | Send an image message to an WhatsApp User |
send_message_controller_send_list_message | POST /rest/sendMessage/{instance_key}/listMessage | Send an vacard message to an WhatsApp User |
send_message_controller_send_location_message | POST /rest/sendMessage/{instance_key}/location | Send an location to an WhatsApp User |
send_message_controller_send_media_url | POST /rest/sendMessage/{instance_key}/mediaUrl | Send a media message via a URL |
send_message_controller_send_template_messsage | POST /rest/sendMessage/{instance_key}/contactMessage | Send an vacard message to an WhatsApp User |
send_message_controller_send_text_message | POST /rest/sendMessage/{instance_key}/textToMany | Send a text message to multiple WhatsApp users |
send_message_controller_send_text_message_to_single_user | POST /rest/sendMessage/{instance_key}/text | Send a text message to an WhatsApp User |
send_message_controller_send_video_message | POST /rest/sendMessage/{instance_key}/video | Send an video to an WhatsApp User |
send_message_controller_send_audio_message(instance_key)
Send an audio to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.bad_request import BadRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
id = "id_example" # str | (optional)
caption = "caption_example" # str | (optional)
file = open('/path/to/file', 'rb') # file_type | (optional)
# example passing only required values which don't have defaults set
try:
# Send an audio to an WhatsApp User
api_instance.send_message_controller_send_audio_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_audio_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an audio to an WhatsApp User
api_instance.send_message_controller_send_audio_message(instance_key, id=id, caption=caption, file=file)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_audio_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
id | str | [optional] | |
caption | str | [optional] | |
file | file_type | [optional] |
void (empty response body)
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
400 | <File too long | Too many parts |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_buttons_message(instance_key)
Send an interactive template message to an WhatsApp User
The templateMessage is a special type of message that allows
you to send a message with a special buttons like quickReply,
urlButton, callButton, etc.
How to send templateMessage?
The messageData object requires you to specify the type of button you
want to send to the user.
The type of button you can send are:
replyButton
urlButton
callButton
In the payload field, you have to enter the payload
i.e. url in case of the urlButton or phone number in case of callButton
Example of templateMessage?
{
"messageData":{
"to":"918788889688",
"text":"string",
"buttons":[
{
"type":"replyButton",
"title":"This is a replyButton"
},
{
"type":"urlButton",
"title":"This is a urlButton",
"payload":"https://google.com"
},
{
"type":"callButton",
"title":"This is a callButton",
"payload":"918788889688"
}
],
"footerText":"Hello World"
}
}
NOTE: Due to certain limitations from WhatsApp, when you send templateMessage to someone,
the message won't be visible in you phone. Also you will also see that the message has been sent
too your own phone number.
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_buttons_message_request import SendMessageControllerSendButtonsMessageRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_buttons_message_request = SendMessageControllerSendButtonsMessageRequest(
message_data=ButtonMessage(
to="to_example",
text="text_example",
buttons=[
Button(
type="type_example",
title="title_example",
payload="payload_example",
),
],
footer_text="footer_text_example",
),
) # SendMessageControllerSendButtonsMessageRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send an interactive template message to an WhatsApp User
api_instance.send_message_controller_send_buttons_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_buttons_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an interactive template message to an WhatsApp User
api_instance.send_message_controller_send_buttons_message(instance_key, send_message_controller_send_buttons_message_request=send_message_controller_send_buttons_message_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_buttons_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_buttons_message_request | SendMessageControllerSendButtonsMessageRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_buttons_message_with_media(instance_key)
Send an interactive template message with mediaHeader to an WhatsApp User
The templateMessage is a special type of message that allows
you to send a message with a special buttons like quickReply,
urlButton, callButton, etc.
How to send templateMessage?
The messageData object requires you to specify the type of button you
want to send to the user.
The type of button you can send are:
replyButton
urlButton
callButton
In the payload field, you have to enter the payload
i.e. url in case of the urlButton or phone number in case of callButton
Example of templateMessage?
{
"messageData":{
"to":"918788889688",
"text":"string",
"buttons":[
{
"type":"replyButton",
"title":"This is a replyButton"
},
{
"type":"urlButton",
"title":"This is a urlButton",
"payload":"https://google.com"
},
{
"type":"callButton",
"title":"This is a callButton",
"payload":"918788889688"
}
],
"footerText":"Hello World"
}
}
NOTE: Due to certain limitations from WhatsApp, when you send templateMessage to someone,
the message won't be visible in you phone. Also you will also see that the message has been sent
too your own phone number.
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_buttons_message_with_media_request import SendMessageControllerSendButtonsMessageWithMediaRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_buttons_message_with_media_request = SendMessageControllerSendButtonsMessageWithMediaRequest(
message_data=ButtonMessageWithImage(
to="to_example",
text="text_example",
buttons=[
Button(
type="type_example",
title="title_example",
payload="payload_example",
),
],
footer_text="footer_text_example",
image_url="image_url_example",
media_type="media_type_example",
mime_type="mime_type_example",
),
) # SendMessageControllerSendButtonsMessageWithMediaRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send an interactive template message with mediaHeader to an WhatsApp User
api_instance.send_message_controller_send_buttons_message_with_media(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_buttons_message_with_media: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an interactive template message with mediaHeader to an WhatsApp User
api_instance.send_message_controller_send_buttons_message_with_media(instance_key, send_message_controller_send_buttons_message_with_media_request=send_message_controller_send_buttons_message_with_media_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_buttons_message_with_media: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_buttons_message_with_media_request | SendMessageControllerSendButtonsMessageWithMediaRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_document_message(instance_key)
Send an document to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.bad_request import BadRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
id = "id_example" # str | (optional)
caption = "caption_example" # str | (optional)
file = open('/path/to/file', 'rb') # file_type | (optional)
# example passing only required values which don't have defaults set
try:
# Send an document to an WhatsApp User
api_instance.send_message_controller_send_document_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_document_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an document to an WhatsApp User
api_instance.send_message_controller_send_document_message(instance_key, id=id, caption=caption, file=file)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_document_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
id | str | [optional] | |
caption | str | [optional] | |
file | file_type | [optional] |
void (empty response body)
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
400 | <File too long | Too many parts |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_image_message(instance_key)
Send an image message to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.bad_request import BadRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
id = "id_example" # str | (optional)
caption = "caption_example" # str | (optional)
file = open('/path/to/file', 'rb') # file_type | (optional)
# example passing only required values which don't have defaults set
try:
# Send an image message to an WhatsApp User
api_instance.send_message_controller_send_image_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_image_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an image message to an WhatsApp User
api_instance.send_message_controller_send_image_message(instance_key, id=id, caption=caption, file=file)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_image_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
id | str | [optional] | |
caption | str | [optional] | |
file | file_type | [optional] |
void (empty response body)
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
400 | <File too long | Too many parts |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_list_message(instance_key)
Send an vacard message to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_list_message_request import SendMessageControllerSendListMessageRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_list_message_request = SendMessageControllerSendListMessageRequest(
message_data=SendListMessageData(
to="to_example",
button_text="button_text_example",
text="text_example",
title="title_example",
description="description_example",
sections=[
ListSection(
title="title_example",
rows=[
ListRow(
title="title_example",
description="description_example",
row_id="row_id_example",
),
],
),
],
list_type=3.14,
),
) # SendMessageControllerSendListMessageRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send an vacard message to an WhatsApp User
api_instance.send_message_controller_send_list_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_list_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an vacard message to an WhatsApp User
api_instance.send_message_controller_send_list_message(instance_key, send_message_controller_send_list_message_request=send_message_controller_send_list_message_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_list_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_list_message_request | SendMessageControllerSendListMessageRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_location_message(instance_key)
Send an location to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_location_message_request import SendMessageControllerSendLocationMessageRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_location_message_request = SendMessageControllerSendLocationMessageRequest(
message_data=LocationMessage(
to="to_example",
caption="caption_example",
coordinates=LocationCordinates(
lat=3.14,
long=3.14,
),
),
) # SendMessageControllerSendLocationMessageRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send an location to an WhatsApp User
api_instance.send_message_controller_send_location_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_location_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an location to an WhatsApp User
api_instance.send_message_controller_send_location_message(instance_key, send_message_controller_send_location_message_request=send_message_controller_send_location_message_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_location_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_location_message_request | SendMessageControllerSendLocationMessageRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_media_url(instance_key)
Send a media message via a URL
The this endpoint allows you to send a media URL to a user.
The url parameter is the URL of the media to be sent.
The to parameter is the phone number of the user to send the media to.
The type parameter is the type of media to be sent.
The type of media can be one of the following:
- image - an image
- video - a video
- audio - an audio file
- document - a document
The caption parameter is the caption of the media to be sent.
The mimeType parameter is the mimeType of the media.
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_media_url_request import SendMessageControllerSendMediaUrlRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_media_url_request = SendMessageControllerSendMediaUrlRequest(
message_data=MediaUrlMessage(
to="to_example",
url="url_example",
type="type_example",
caption="caption_example",
mime_type="mime_type_example",
),
) # SendMessageControllerSendMediaUrlRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send a media message via a URL
api_instance.send_message_controller_send_media_url(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_media_url: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send a media message via a URL
api_instance.send_message_controller_send_media_url(instance_key, send_message_controller_send_media_url_request=send_message_controller_send_media_url_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_media_url: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_media_url_request | SendMessageControllerSendMediaUrlRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_template_messsage(instance_key)
Send an vacard message to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_template_messsage_request import SendMessageControllerSendTemplateMesssageRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_template_messsage_request = SendMessageControllerSendTemplateMesssageRequest(
message_data=SendVCardData(
to="to_example",
vcard=ContactData(
full_name="full_name_example",
display_name="display_name_example",
organization="organization_example",
phone_number="phone_number_example",
),
),
) # SendMessageControllerSendTemplateMesssageRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send an vacard message to an WhatsApp User
api_instance.send_message_controller_send_template_messsage(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_template_messsage: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an vacard message to an WhatsApp User
api_instance.send_message_controller_send_template_messsage(instance_key, send_message_controller_send_template_messsage_request=send_message_controller_send_template_messsage_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_template_messsage: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_template_messsage_request | SendMessageControllerSendTemplateMesssageRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_text_message(instance_key)
Send a text message to multiple WhatsApp users
Note that while sending to single chat, the id should not contain @s.whatsapp.net.
However, while sending to groups, the id should end with @g.us
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_text_message_request import SendMessageControllerSendTextMessageRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_text_message_request = SendMessageControllerSendTextMessageRequest(
message_data=TextMessge(
to=[
"to_example",
],
text="text_example",
),
) # SendMessageControllerSendTextMessageRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send a text message to multiple WhatsApp users
api_instance.send_message_controller_send_text_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_text_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send a text message to multiple WhatsApp users
api_instance.send_message_controller_send_text_message(instance_key, send_message_controller_send_text_message_request=send_message_controller_send_text_message_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_text_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_text_message_request | SendMessageControllerSendTextMessageRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_text_message_to_single_user(instance_key)
Send a text message to an WhatsApp User
Note that while sending to single chat, the id should not contain @s.whatsapp.net.
However, while sending to groups, the id should end with @g.us
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.send_message_controller_send_text_message_to_single_user_request import SendMessageControllerSendTextMessageToSingleUserRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
send_message_controller_send_text_message_to_single_user_request = SendMessageControllerSendTextMessageToSingleUserRequest(
message_data=TextMessgeSingle(
to="to_example",
text="text_example",
),
) # SendMessageControllerSendTextMessageToSingleUserRequest | (optional)
# example passing only required values which don't have defaults set
try:
# Send a text message to an WhatsApp User
api_instance.send_message_controller_send_text_message_to_single_user(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_text_message_to_single_user: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send a text message to an WhatsApp User
api_instance.send_message_controller_send_text_message_to_single_user(instance_key, send_message_controller_send_text_message_to_single_user_request=send_message_controller_send_text_message_to_single_user_request)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_text_message_to_single_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
send_message_controller_send_text_message_to_single_user_request | SendMessageControllerSendTextMessageToSingleUserRequest | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_message_controller_send_video_message(instance_key)
Send an video to an WhatsApp User
import time
import openapi_client
from openapi_client.api import send_message_controller_api
from openapi_client.model.bad_request import BadRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = send_message_controller_api.SendMessageControllerApi(api_client)
instance_key = "instance_key_example" # str |
id = "id_example" # str | (optional)
caption = "caption_example" # str | (optional)
file = open('/path/to/file', 'rb') # file_type | (optional)
# example passing only required values which don't have defaults set
try:
# Send an video to an WhatsApp User
api_instance.send_message_controller_send_video_message(instance_key)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_video_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send an video to an WhatsApp User
api_instance.send_message_controller_send_video_message(instance_key, id=id, caption=caption, file=file)
except openapi_client.ApiException as e:
print("Exception when calling SendMessageControllerApi->send_message_controller_send_video_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instance_key | str | ||
id | str | [optional] | |
caption | str | [optional] | |
file | file_type | [optional] |
void (empty response body)
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
400 | <File too long | Too many parts |
[Back to top] [Back to API list] [Back to Model list] [Back to README]