I'm trying to do a telegram bot who send vidéo
import fetch from 'node-fetch'
fetch("https://api.telegram.org/bot<api>/sendVideo", {
method: "POST",
headers: {
"Content-Type": "multipart/form-data",
},
body: JSON.stringify({
chat_id: <chat.id>,
video: "C:\\output\\output.webm",
caption: "test"
})
}).then(res => res.json()).then(json => console.log(json));
hello, i am making a telegram bot that sends some video on demand but i have a problem while uploading the video to telegram servers, can you help me? thx
and I have this error
Uncaught SyntaxError SyntaxError: Unexpected end of JSON input at json (undefined:149:15) at processTicksAndRejections (undefined:96:5) Aucun débogueur disponible. Impossible d'envoyer 'variables' Process exited with code 1