InteractionValidator class

Validate received Interactions

This is required for Discord to send webhook events

If you are not properly validating this signature header, we will not allow you to save your interactions URL in the Dev Portal. We will also do automated, routine security checks against your endpoint, including purposefully sending you invalid signatures. If you fail the validation, we will remove your interactions URL in the future and alert you via email and System DM.

https://discord.com/developers/docs/interactions/receiving-and-responding#security-and-authorization

Constructors

InteractionValidator({required String applicationPublicKey})
Your public key can be found on your application in the Developer Portal

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate({required Map<String, String> headers, required String body}) bool
Validate an Interaction message

Operators

operator ==(Object other) bool
The equality operator.
inherited