Skip to content

Send a File to Discord


Send a File

Sends a File to Discord


POST /api/discord/sendfile
Terminal window
https://api.cookie-api.com/api/discord/sendfile


{
"bot_token": "Your Bot's Token",
"channel_id": "number",
"file_urls": ["string"],
"file_names": "string", //optional
"content": "content" //optional
}

curl --location 'https://api.cookie-api.com/api/discord/sendfile' \
--header 'Content-Type: application/json' \
--header 'Authorization: API_Key' \
--data '{
"bot_token": "Bot_Token",
"channel_id": "Channel_ID",
"file_urls": ["https://upload.wikimedia.org/wikipedia/commons/7/78/Image.jpg", "https://upload.wikimedia.org/wikipedia/commons/b/bc/Information_example_page_300px.jpg"],
"content": "If you read this you are cool!"
}'

Responses
{
"message": "Files sent successfully",
"message_id": "123456789",
"success": true
}