curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Re: query

From: Hans Henrik Bergan via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 28 Nov 2022 23:20:51 +0100

Windows's cmd arguments system is *)(/&%ing garbage, avoid it if
possible: https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way

dealing with WSL or Cygwin is way less painful than *properly* dealing
with cmd arguments.
still, if you absolutely have to, try
curl -i -X POST ^
"https://graph.facebook.com/v15.0/113037868294137/messages^" ^
-H "Authorization: Bearer mi_code_here" ^
-H "Content-Type: application/json" ^
-d "{ \"messaging_product\": \"whatsapp\", \"to\": \"543465651891\",
\"type\": \"template\", \"template\": { \"name\": \"hello_world\",
\"language\": { \"code\": \"en_US\" } } }"


now you might ask why i added a ^ in the end of the url? I DON'T KNOW
WHY, it was trial-and-error, it works with a ^ at the end of the url,
it gets corrupted if you remove it, i'm sure it's possible to figure
out why,
but it's not worth it. if at all possible, avoid windows command line.

On Mon, 28 Nov 2022 at 22:48, danielcorrente--- via curl-users
<curl-users_at_lists.haxx.se> wrote:
>
> the apy say it:
>
> curl -i -X POST \
> https://graph.facebook.com/v15.0/105954558954427/messages \
> -H 'Authorization: Bearer EAAFl...' \
> -H 'Content-Type: application/json' \
> -d '{ "messaging_product": "whatsapp", "to": "15555555555", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }'
>
> I don't know how to translate this so that it works in windows curl (it is not explained in the api)
> I appreciate if someone already did this and can help me
>
>
>
> From: danielcorrente--- via curl-users
> Date: 2022-11-28 18:43
> To: curl-users
> CC: danielcorrente_at_hotmail.com
> Subject: Re: Re: query
>
> I'm sure you can handle reading the API on your own.
> If I already read it and it doesn't say explain how to do it, that's why I wrote these emails
>
>
>
>
> From: Dan Fandrich via curl-users
> Date: 2022-11-28 18:38
> To: curl-users
> CC: Dan Fandrich
> Subject: Re: query
> On Mon, Nov 28, 2022 at 06:29:38PM -0300, danielcorrente--- via curl-users wrote:
> > whatsapp link:
> > https://developers.facebook.com/docs/whatsapp/cloud-api/get-started?locale=
> > es_LA#sent-test-message
>
> I'm sure you can handle reading the API on your own.
>
> > my errors:
> > [cid]
>
> Please don't post images. They are hard to view, manipulate and quote. But,
> that image shows that it is, indeed, a quoting issue you're facing.
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-users
> Etiquette: https://curl.se/mail/etiquette.html
>
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-users
> Etiquette: https://curl.se/mail/etiquette.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-11-28