Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ping interaction fails when using callback endpoint for response #7311

Open
fbrettnich opened this issue Dec 16, 2024 · 1 comment
Open

Ping interaction fails when using callback endpoint for response #7311

fbrettnich opened this issue Dec 16, 2024 · 1 comment

Comments

@fbrettnich
Copy link
Contributor

Description

When verifying an endpoint for HTTP interactions, the PING request (Interaction Type 1) must be acknowledged directly via an HTTP response with a status 200 and a PONG payload (Interaction Callback Type 1). Attempting to respond via the callback endpoint (POST /interactions/:id/:token/callback) instead results in a 404 error, causing endpoint verification to fail.

It was recommended by a Discord staff to open an issue so this behavior can be re-evaluated.

Steps to Reproduce

  1. Discord sends a valid POST request with a PING payload (Interaction Type 1) to the provided endpoint to verify the endpoint
  2. The app responds with status code 202
  3. The app posts a PONG payload (Interaction Callback Type 1) to the callback endpoint (POST /interactions/:id/:token/callback) using the interaction id and token provided in the initial request
  4. Discord responds with a 404 error, and the endpoint verification fails

Expected Behavior

It should be possible to use the callback endpoint to respond to PING requests, similar to other interaction types

Current Behavior

Discord rejects the callback request with a 404 error, making it mandatory to respond directly to the initial HTTP request to complete endpoint verification

Screenshots/Videos

No response

Client and System Information

API v10

@DV8FromTheWorld
Copy link
Member

Additional context that led to the creation of this ticket:

This is technically true. Given the fact that we opened up to recommending use of the callback endpoint for debuggability / general use, especially given it returns data now, we should re-evaluate if this requirement (response via http response vs callback) is still desired.
My guess is this fell through the cracks.

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

No branches or pull requests

2 participants