Skip to main content
Best answer

Webhook "400: Bad Request" connecting to Discord


Forum|alt.badge.img+1
  • Beginner
  • 13 replies

Hi,

I am trying to connect a Webhook to Discord and the result is always a "400: Bad Request".

My st up is:

 

Action Event: Custom Event
Methos: POST

Th Webhook URL given by Discord

Data:


https://leovoel.github.io/embed-visualizer/ Proves formatting is correct

 



Under headers content-type | applications/json

And still I get a  "400: Bad Request".

 

 

 

¿Any Suggestions?

Best answer by JuanBest answer by Juan

I Finallly made it!
If someone needs help with this just write and will help gladly

View original
Did this topic help you find an answer to your question?
20% found this helpful
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

17 replies

andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 7, 2020

Hello! Please can you share how you’ve configured this in Zapier?


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 11, 2020

@andywingrave,  don´t understanbd what do you mean, as all the info about the configuration in zappier is in the message and the code of the webhook in the photo.
Is there other config that I am not showing?


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 11, 2020

@Juan sorry, I mean the form data you configure before you get that message.


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 11, 2020

¥es @andywingrave its there. I´ll copy it again here:

My st up is:

Action Event: Custom Event
Methos: POST

The Webhook URL given by Discord
Under headers content-type | applications/json


https://uploads-us-west-2.insided.com/zapier-ca/attachment/f7685e10-6fc4-44e2-b26c-54b97b2dedcd.png

 

 


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 11, 2020

Hey! That’s the screenshot of your JSON - I meant can you please share a screenshot of what you have set up in your Zapier webhook?


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 11, 2020

@andywingrave 
My st up is:

Action Event: Custom Event
Method: POST

The Webhook URL given by Discord (not the one on the screenshot)
Under headers content-type | applications/json

 

 


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 11, 2020

Hey - The reason why this is not working is that you need to add authentication to a POST request. Have you tried this?


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 11, 2020
andywingrave wrote:

Hey - The reason why this is not working is that you need to add authentication to a POST request. Have you tried this?


No I have not. How can I do that @andywingrave 

 

Thank you.


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 11, 2020

Hey @Juan This is really something that a developer should be doing, or at least someone who has spent some time with making HTTP requests, so it pains me to say it, but you’d need learn these fundamentals before making these kind of steps. 

There’s some documentation here: https://discord.com/developers/docs/reference

But honestly? I would start here: https://learning.postman.com/

 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 12, 2020

Thank you Andy, but if I have already authorized Zapier as the Bot in Discord, shouldnt Zapier handle de HTTP request authentication? It is not a required field. And if I dont use Embed and only content, it will pass without the Basic Auth. 


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 12, 2020

But are you using a Webhook or a Discord task here? It looks to me like you’re using a webhook? (Sorry if I’m wrong) 

 

For your Discord log-in to be used in tasks, you’d need to select a Discord task like one of the ones below 

But a webhook is a completely seperate thing, and your credentials don’t carry over.

Hope that makes sense. 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 16, 2020

Hi @andywingrave Its a Webhook.

Looking into Discord developer docs about Webhooks it states clearly that they dont require authentication to be used.

 

“Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.”
https://discord.com/developers/docs/resources/webhook

 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • November 16, 2020

Hi Andy,

 

Managed to make the webhook work without Authentication. The problem was in the code. I got an expert to help me with the Discord code and it works.

 

BUT

 

As soon as I insert Zapier Values like {{103505283__COL$D}} that comes from my Worksheet it will break the code again. If I enter the text that is in the worksheet cell, it works.
 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 13 replies
  • Answer
  • November 18, 2020

I Finallly made it!
If someone needs help with this just write and will help gladly


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • November 18, 2020

That’s awesome! Well done! Can you explain to the rest of us what was wrong and how you fixed it? 


  • New
  • 1 reply
  • November 23, 2020
Juan wrote:

I Finallly made it!
If someone needs help with this just write and will help gladly

Hi Juan, I’d like to know how did you fix this error.


nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • November 24, 2020

Hey @Juan!

That’s fantastic that you got it working. If you’d be able to explain how you accomplished that, we sure would appreciate it :)