Skip to main content

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?

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


@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?


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


¥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

 

 


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?


@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

 

 


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


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.


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/

 


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. 


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. 


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

 


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.
 


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


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


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.


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 :)