Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upload media to WhatsApp cloud API
I need to upload a PDF file to a WhatsApp Cloud API.
Can someone help me translate this WhatsApp curl example code to Delphi pascal?
Here is the code from the WhatsApp documentation (JPEG example):
curl -X POST \
  '' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -F 'file=@/local/path/file.jpg;type=image/jpeg'
  -F 'messaging_product=whatsapp'

I don't know how to translate the file parameter. It includes both path and file type attributes.
-F 'file=@/local/path/file.jpg;type=image/jpeg' 

I use Delphi RIO 10.3
Thanks in advance

Messages In This Thread
Upload media to WhatsApp cloud API - by Lior I - 12-18-2022, 10:24 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)