2

We are trying to user whatsap API, playing with sandbox from Gupshup, the API works if i use gupshups sample pdf or files, at teh same time if i user a pdf from public url it throws the error "Url Not WhiteListed", but i dont see anywhere about the URL has to be whitelisted!!

my payload is this

curl -X POST https://api.gupshup.io/sm/api/v1/msg / -H 'Cache-Control: no-cache' / -H 'Content-Type: application/x-www-form-urlencoded' / -H 'apikey: 65XXX6afed5XXX01cd0a6bXXXf0a2XXX' / -H 'cache-control: no-cache' / -d 'channel=whatsapp&source=917834811114&destination=91XX88XX5X3 &message={"type":"file","url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf","caption":"","filename":"dummy.pdf"}&src.name=Coolbuy​'

1 Answers1

3

According to support of gupshup bellow, you won't be able to send public URLs files, unless your App goes live.

https://support.gupshup.io/hc/en-us/articles/360014736559-While-sending-media-files-through-Sandbox-App-I-am-getting-Media-URL-Not-Whitelisted-error-How-can-I-whitelist-my-media-URL-

You are trying to send these media files from your App which is not LIVE yet using our Sandbox. Sandbox API is limited and only supports sending text message and media message given below:

Image:

JPG:

  1. https://www.buildquickbots.com/whatsapp/media/sample/jpg/sample01.jpg

  2. https://www.buildquickbots.com/whatsapp/media/sample/jpg/sample02.jpg

PNG:

  1. https://www.buildquickbots.com/whatsapp/media/sample/png/sample01.png

  2. https://www.buildquickbots.com/whatsapp/media/sample/png/sample02.png File:

PDF:

  1. https://www.buildquickbots.com/whatsapp/media/sample/pdf/sample01.pdf

  2. https://www.buildquickbots.com/whatsapp/media/sample/pdf/sample02.pdf

This restriction is kept for media messages due to security reasons. You will be able to send all supported media messages when your app will be Live with your business phone number. Hence, using any other URL in Sandbox mode for sending media will give you an error message that Media Url Not WhiteListed.