Web-hooks Tutorial with Discord and Vanilla Javascript (fetch api)
Webhooks are custom callbacks URLs that an application can call to communicate with another application. A popular uses of webhooks are github and discord. Where discord creates a webhook and you can share that webhook for other applications to “hook” into it to post messages discord when something happened in the application. When I upload a video post a link to discord
In this video, Ill demonstrate webhooks with vanilla Javascript fetch api and discord webhooks. We will execute a fetch api call from the browser,
0:00 Intro
1:10 Webhooks Explained
5:20 Example
const whurl ="https://discordapp.com/api/webhooks/655433405068214293/mcp5150ruDAwgWG_H5zrB_PHpd-UfMdP4Jn2aZVTt2k2jGmb_0VpCAo5roLPcQVZcNgU"
const msg = {
"content": "Hello! I'm a bot, this is fetch api"
}
fetch(whurl + "?wait=true",
{"method":"POST",
"headers": {"content-type": "application/json"},
"body": JSON.stringify(msg)})
.then(a=xa.json()).then(console.log)
replacex with greater than
Discord API
https://discordapp.com/developers/docs/resources/webhook
Discord Server Link https://discord.gg/CsFbFce
🏭 Software Architecture Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXNP6mQchJVP3S-3oKGEuw9
💾 Database Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2
🛰 Network Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQUBSgBXilKhRMJ1ACqr7pTr
🏰 Load Balancing and Proxies Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQVMeBmWI2AhxULWEeo7AaMC
🐘 Postgres Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWGrOqslniFlRcwxyY94cjj
🚢Docker
https://www.youtube.com/playlist?list=PLQnljOFTspQWsD-rakNw1C20c1JI8UR1r
🧮 Programming Pattern Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQV1emqxKbcP5esAf4zpqWpe
🛡 Web Security Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU3YDMRSMvzflh_qXoz9zfv
🦠 HTTP Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU6zO0drAYHFtkkyfNJw1IO
🐍 Python Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU_M83ARz8mDdr4LThzkBKX
🔆 Javascript Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWab0g3W6ZaDM6_Buh20EWM
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
https://www.patreon.com/join/hnasr?
Stay Awesome,
Hussein
Видео Web-hooks Tutorial with Discord and Vanilla Javascript (fetch api) канала Hussein Nasser
In this video, Ill demonstrate webhooks with vanilla Javascript fetch api and discord webhooks. We will execute a fetch api call from the browser,
0:00 Intro
1:10 Webhooks Explained
5:20 Example
const whurl ="https://discordapp.com/api/webhooks/655433405068214293/mcp5150ruDAwgWG_H5zrB_PHpd-UfMdP4Jn2aZVTt2k2jGmb_0VpCAo5roLPcQVZcNgU"
const msg = {
"content": "Hello! I'm a bot, this is fetch api"
}
fetch(whurl + "?wait=true",
{"method":"POST",
"headers": {"content-type": "application/json"},
"body": JSON.stringify(msg)})
.then(a=xa.json()).then(console.log)
replacex with greater than
Discord API
https://discordapp.com/developers/docs/resources/webhook
Discord Server Link https://discord.gg/CsFbFce
🏭 Software Architecture Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXNP6mQchJVP3S-3oKGEuw9
💾 Database Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2
🛰 Network Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQUBSgBXilKhRMJ1ACqr7pTr
🏰 Load Balancing and Proxies Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQVMeBmWI2AhxULWEeo7AaMC
🐘 Postgres Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWGrOqslniFlRcwxyY94cjj
🚢Docker
https://www.youtube.com/playlist?list=PLQnljOFTspQWsD-rakNw1C20c1JI8UR1r
🧮 Programming Pattern Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQV1emqxKbcP5esAf4zpqWpe
🛡 Web Security Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU3YDMRSMvzflh_qXoz9zfv
🦠 HTTP Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU6zO0drAYHFtkkyfNJw1IO
🐍 Python Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU_M83ARz8mDdr4LThzkBKX
🔆 Javascript Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWab0g3W6ZaDM6_Buh20EWM
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
https://www.patreon.com/join/hnasr?
Stay Awesome,
Hussein
Видео Web-hooks Tutorial with Discord and Vanilla Javascript (fetch api) канала Hussein Nasser
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Webhooks vs Websockets vs HTTP Streaming - Which Event-Driven API to use?Webhooks aka Reverse APIsCode Your Own Discord Bot - Basics (2021)Create a Discord Bot With Node.jsWebSockets Crash Course - Handshake, Use-cases, Pros & Cons and moreWebhooks for Beginners - Full Course1.4: JSON - Working with Data and APIs in JavaScriptDrone Simulation and Control, Part 1: Setting Up the Control ProblemLink Twitch, Youtube, and Twitter to Discord Using WebhooksWhat is a Webhook? Webhooks for BeginnersHow to get Embed Text with Webhooks on Discord (Easy and Simple!) - Discord TutorialCode a Discord Bot with JavaScript - Host for Free in the Cloudwhen indexes are useless | The Backend Engineering ShowWhat port is it?Build a Web Scraper (super simple!)Automate Facebook Page Posts with Python and Facebook Graph APIBuild A Javascript OCR App TutorialScaling and Securing WebSockets with HAProxyGetting Started with Discord webhooks using the Discord API