Error sending webhook to slack
See original GitHub issueIssue
• Following the Github to Slack example • I am trying to send my own webhook request like this:
function postToSlack() {
return rp({
method: 'POST',
uri: "https://hooks.slack.com/services/TEAM_ID/BOT_ID/API_KEY",
body: {
channel: "#CHANNEL_NAME",
username: "webhookbot",
text: "MESSAGE"
},
json: true
});
}
• I am getting this error
{
"name": "RequestError",
"message": "Error: getaddrinfo ENOTFOUND hooks.slack.com hooks.slack.com:443",
"cause": {
"code": "ENOTFOUND",
"errno": "ENOTFOUND",
"syscall": "getaddrinfo",
"hostname": "hooks.slack.com",
"host": "hooks.slack.com",
"port": 443
},
"error": {
"code": "ENOTFOUND",
"errno": "ENOTFOUND",
"syscall": "getaddrinfo",
"hostname": "hooks.slack.com",
"host": "hooks.slack.com",
"port": 443
}
}
• I tried to run the same function I am deploying in a my local node server and it works just fine
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Sending messages using Incoming Webhooks - Slack API
Incoming Webhooks are a simple way to post messages from apps into Slack. Creating an Incoming Webhook gives you a unique URL to...
Read more >Incoming webhooks for Slack
Incoming webhooks are a simple way to share information from external sources with your workspace. How it works Send data to the channel...
Read more >Outgoing Webhooks - Slack API
Outgoing Webhooks are a legacy method of sending notifications to an app about two specific activities: ... Because we strongly recommend you do...
Read more >Error troubleshooting - Slack API
You're not logged in to a workspace. Use the command slack login to authenticate again. socket_connection_error. Couldn't connect to slack over websocket.
Read more >Incoming Webhooks - Slack API
Incoming webhooks are a simple way to post messages from apps into Slack. Because we strongly recommend you do not use legacy custom...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you on the free plan? The free plan cannot make external network requests. See more details here: https://firebase.google.com/pricing/ under bullet point 3
@nicolasgarnier no worries! that would save some people time debugging for sure!