Skip to content

Add Java example on how to validate webhook requests#8433

Closed
freya022 wants to merge 2 commits into
discord:mainfrom
freya022:java-webhook-validate-example
Closed

Add Java example on how to validate webhook requests#8433
freya022 wants to merge 2 commits into
discord:mainfrom
freya022:java-webhook-validate-example

Conversation

@freya022

Copy link
Copy Markdown
Contributor

Title. Used an external dependency as it is much cleaner than using the standard library.

@freya022 freya022 requested a review from a team as a code owner June 27, 2026 11:20
@freya022 freya022 requested review from anthonydiscord and removed request for a team June 27, 2026 11:20
abort(401, 'invalid request signature')
```

**Java**

@markmandel markmandel Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not against having multiple code examples, but if we do this, we should use Code Groups:
https://www.mintlify.com/docs/components/code-groups

WDYT @anthonydiscord ? we want multiple code versions?

Edit: we actually want code groups.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is regular text, I have to move it to the code as comments if we do want to use code groups, but then it looks much worse 😬

@anthonydiscord

Copy link
Copy Markdown
Contributor

We understand right now code samples are mainly in JS but it might make more sense for libraries to have their own documentation in their languages instead. Let us think for a bit about how we want to handle code samples across languages 🤔 For now I'm going to close this PR but I'll let you know what comes out of this

@freya022

freya022 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

The reason for adding this was mainly because someone asked in JDA's server, it's not exactly easy to figure out, and I cannot find any JVM library that handles HTTP interactions nor webhook events. So i figured this could help everyone using JVM languages, no matter what Discord library they use, and independently of the webserver being used (there are quite many to choose from)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants