Table of Contents

Method VerifySignature

Namespace
DSharpPlus.Net.InboundWebhooks
Assembly
DSharpPlus.dll

VerifySignature(ReadOnlySpan<byte>, string, string, string)

Verifies the signature of a http interaction.

public static bool VerifySignature(ReadOnlySpan<byte> body, string timestamp, string signingKey, string publicKey)

Parameters

body ReadOnlySpan<byte>

Raw http body

timestamp string

Timestamp header sent by discord. TimestampHeaderName

signingKey string

Signing key sent by discord. SignatureHeaderName

publicKey string

Public key of the application this interaction was sent. This key can be accessed at DiscordApplication. VerifyKey

Returns

bool

Indicates if this signature is valid.