Sending Media Attachments – Push
You can send media files using the below method;
Please pass your internet facing public URL of your media file through “globalmedia” please make sure the media file can be downloaded and accessible through internet. Those who are using standalone application or don't have a webserver for media files then can make use of "globalmedia_code" to pass the base64 code of the media files

Supported Media Files

Platform
Type
Extension
Max Size
WhatsApp
Images
jpg, jpeg, gif, png, image
5 MB
WhatsApp
Video
mp4, 3gpp
16 MB
WhatsApp
Audio
mp3, wav, aac, m4a, amr, opus
16 MB
WhatsApp
Document
Any valid MIME-type
100 MB
Only H.264 video codec and AAC audio codec is supported by WhatsApp

Optional Caption Message

For image & video you can pass caption text in the “globalmessage” or “message” variables, by passing a separate message in the “message” variable you have the capability to send dynamic caption message which is helpful for sending personalised messages with image & video. Please note caption message works only with “image & video” files
whatsapp-image-with-caption-message
Sending Dynamic Media
Currently we don't support sending dynamic media files to each contacts through a single API for phone & WhatsApp Web automation, so if you need to send dynamic images then please trigger the API multiple times keeping 5 seconds intervals between each API request. Sending dynamic media file is supported for those who are using WhatsApp Official or WhatsApp Shared Numbers use "media" or "media_code" variable
post
https://pickyassist.com/app/api/v2
/push
Sending Media Attachments Messages

Sample Request Body JSON for Sending Static Media Files

1
{
2
"token": "PICKY_API_TOKEN",
3
"priority ": "0",
4
"application": "1",
5
"media_file": "Name of the File",
6
"globalmessage": "Media URL",
7
"globalmedia": "MEDIA FILE UNIQUE URL",
8
"data": [
9
{
10
"number": "NUMBER 1",
11
"message": "Caption Message"
12
}
13
]
14
}
Copied!

Sample Request Body JSON for sending Static Media Files using Base64

1
{
2
"token": "PICKY_API_TOKEN",
3
"priority ": "0",
4
"application": "1",
5
"globalmessage_code": "Media Base64 Code",
6
"globalmedia": "MEDIA FILE UNIQUE URL",
7
"data": [
8
{
9
"number": "NUMBER 1",
10
"message": "Caption Message"
11
}
12
]
13
}
Copied!

Sample Request Body JSON for Sending Audio File as Voice Note

Please note this method works only WhatsApp Web Automation Channel
1
{
2
"token":"248f02903a57ee0fed380bd500dd1293e6d",
3
"application":"10",
4
"globalmedia":"Audio URL",
5
"voice":1,
6
"data":[
7
{
8
"number":"1194407768",
9
"message":""
10
}
11
]
12
}
Copied!

Sample Request Body JSON for Sending Dynamic Media

Sending dynamic media is supported only in WhatsApp Official & WhatsApp Shared Numbers
1
{
2
"token":"PICKY_API_TOKEN",
3
"priority ":"0",
4
"application":"8",
5
"globalmessage":"",
6
"data":[
7
{
8
"number":"NUMBER 1",
9
"message":"MESSAGE FOR NUMBER 1",
10
"media":"media url for number 1"
11
},
12
{
13
"number":"NUMBER 2",
14
"message":"MESSAGE FOR NUMBER 2",
15
"media":"media url for number "
16
},
17
{
18
"number":"NUMBER 3",
19
"message":"MESSAGE FOR NUMBER 3",
20
"media":"media url for number 3"
21
},
22
{
23
"number":"NUMBER 4",
24
"message":"MESSAGE FOR NUMBER 4",
25
"media":"media url for number 4"
26
},
27
{
28
"number":"NUMBER 5",
29
"message":"MESSAGE FOR NUMBER 5",
30
"media":"media url for number 5"
31
}
32
]
33
}
Copied!

Sample Request Body JSON for Sending Dynamic Media through Base64

Sending dynamic media is supported only in WhatsApp Official & WhatsApp Shared Channels
1
{
2
"token":"PICKY_API_TOKEN",
3
"priority ":"0",
4
"application":"8",
5
"globalmessage":"",
6
"data":[
7
{
8
"number":"NUMBER 1",
9
"message":"MESSAGE FOR NUMBER 1",
10
"media_code":"base64 code for number 1"
11
},
12
{
13
"number":"NUMBER 2",
14
"message":"MESSAGE FOR NUMBER 2",
15
"media_code":"base64 code for number 2"
16
},
17
{
18
"number":"NUMBER 3",
19
"message":"MESSAGE FOR NUMBER 3",
20
"media_code":"base64 code for number 3"
21
},
22
{
23
"number":"NUMBER 4",
24
"message":"MESSAGE FOR NUMBER 4",
25
"media_code":"base64 code for number 4"
26
},
27
{
28
"number":"NUMBER 5",
29
"message":"MESSAGE FOR NUMBER 5",
30
"media_code":"base64 code for number 5"
31
}
32
]
33
}
Copied!

Sample Response

1
{
2
"status": 100,
3
"push_id": "7478630",
4
"message": "Success",
5
"data": [
6
{
7
"msg_id": "9844217",
8
"number": "934343442290",
9
"credit": "0.005"
10
},
11
{
12
"msg_id": "9844218",
13
"number": "35435304220",
14
"credit": "0.005"
15
}
16
]
17
}
Copied!
Please note “100 -> Sucess” response doesn’t means the message has been successfully sent to the user, it means your message has been accepted by our servers and pushed to your phone / docker /app for processing.
Last modified 4mo ago