whatsapp api

500 views
Skip to first unread message

Vikram Chhajer

unread,
Feb 29, 2020, 11:50:01 AM2/29/20
to Harbour Users
Hello 

I am trying to Send Message to whatsapp by api but couldnt know how to make prg  . here is the code for prg  please help to make prg


EXCLAMATION_MARK='!'

--data-urlencode "From=whatsapp:+14155238886" \
--data-urlencode "Body=Hello there$EXCLAMATION_MARK" \
--data-urlencode "To=whatsapp:+15005550006" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token


Thanks 
Vikram

Vikram Chhajer

unread,
Feb 29, 2020, 12:10:47 PM2/29/20
to Harbour Users
I M Trying to use this prg  but getting error 



Function cURL()



// Local cEXE               := 'curl.exe '
Local cMode           := "-X POST " + cPostURL +''

Local cData             := ''

Local cSilent           := '-s '

Local cCmd      

Local cOut              := '-o output.txt '

//Local cEmailfrom  := 'ma...@mail.com'

// Local cSender        := 'John'

// Local cId                 := '123'

**************************************************************************************************************

* EXCLAMATION_MARK='!'

* --data-urlencode "From=whatsapp:+14155238886" \
* --data-urlencode "Body=Hello there$EXCLAMATION_MARK" \
* --data-urlencode "To=whatsapp:+15005550006" \
* -u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token

****************************************************************************************************************


*           --data-urlencode 'From=+19544173234' \
* --data-urlencode 'Body=hello this ti testing message from twill whats app api' \
* --data-urlencode 'ForceDelivery=true' \
* -u aufp**********************************************************7de138a2203dea
*
cData :=    '-H "data-urlencode From=+19544173234" \  '+;

            '-data-urlencode 'Body=hello this ti testing message from twill whats app api' \ '+;

            '-data-urlencode 'ForceDelivery=true' \ '+;
'-data-urlencode "To=whatsapp:++919320124688" \ ' +;

            '-u aufp**********************************************************7de138a2203dea'

          

/* 
cData :=    '-H "Content-Type:multipart/form-data" \  '+;

            '-H "cache-control:no-cache" \  '+;

            '-H "content-type: multipart/form-data" \ '+;

            '-F emailfrom='+cEmailfrom+'\  '+;

            '-F sender='+cSender+'\  '+;

            '-F id='+cId+'\  '+;

            '-F attach=@test.pdf  ' /*



cCmd :=  cMode  + cData + cSilent + cOut


return hb_run(cCmd)

Where i am getting wrong please sugguest me 
Thanks 

vikram

J & B Mouille

unread,
Feb 29, 2020, 12:40:30 PM2/29/20
to Harbour Users
Hello Vikram,

If you are in Windows, I have this attached code NOT TESTED.

Regards,

Bernard.

Le samedi 29 février 2020 18:10:47 UTC+1, Vikram Chhajer a écrit :
I M Trying to use this prg  but getting error 


Vikram
Test.txt

Reinaldo

unread,
Feb 21, 2021, 7:00:08 PM2/21/21
to Harbour Users
Hello Vikram;

Were you able to use Twilio api from harbour?   Can you please share the final working code?

Thank you,

Reinaldo.

Reply all
Reply to author
Forward
0 new messages