Open omalisson opened 3 months ago
In relation to your problem, this way I was able to send the location
{
"chatId": "5521996xxxx@c.us",
"contentType": "Location",
"type": "location",
"latitude": 51.5074,
"longitude": -0.1278,
"name": "London",
"address": "London, United Kingdom",
"caption": "teste"
}
I've managed to send the latitude and longitude, but as well as not opening in the exact location, I can't assign the optional information such as name, url and description. Below is a sample of the output of the message sent via API (incomplete) and another sent via device (complete):
Code:
{ "chatId": "5521912345678@c.us", "contentType": "Location", "content": { "Location": { "latitude":-22.911632, "longitude":-43.578438, "name":"Craque do Pão", "url":"https://foursquare.com/v/5682faa2498e01df84e8efb8", "description":"Craque do Pão" } } }
Output (webhook)
{"latitude":-22.911632,"longitude":-43.578438,"description":""}
{"latitude":-22.911632,"longitude":-43.578438,"name":"Craque do Pão","url":"https://foursquare.com/v/5682faa2498e01df84e8efb8","description":"Craque do Pão"}
Even if I reproduce the "content" with the same information that is sent by the device, the message is cut off as shown in the output above generated by sending via API.
Good evening friend, could you help me, I had no success sending a PDF, do you have any examples to use and see how it is done, thank you in advance.
Hello friend!
I started using this API today and I haven't yet tried sending files (PDF), so I can't help you yet! Sorry!
In relation to your problem, this way I was able to send the location
I'll try it this way!
In relation to your problem, this way I was able to send the location
{ "chatId": "5521996xxxx@c.us", "contentType": "Location", "type": "document", "mimetype": "application/pdf", "caption": "teste", "content": "Localizacao" }
It didn't solve my case.
Olá @stonestecnologia !
Enviar mensagem é bem tranquilo. Pela interface do Swagger é como mostra no print abaixo:
Abaixo segue o modelo que uso em shell script para enviar mensagens:
O traço amarelo na imagem é o campo da API KEY.
I need to send a location but I can't or I've done something wrong. How do I send a location using latitude and longitude?