discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Get Invite endpoint does not respect `with_expiration=0`

Open GnomedDev opened this issue 11 months ago • 2 comments

Description

Using the Get Invite endpoint will always return the expires_at, contrary to the with_expiration query string and documentation.

Steps to Reproduce

  1. curl "https://discord.com/api/v10/invites/m4q4GGss?with_expiration=0" within the next 7 days.
  2. Check the expires_at field.

Expected Behavior

The expires_at field is null or missing.

Current Behavior

The expires_at field is always returned.

Screenshots/Videos

No response

Client and System Information

curl 8.12.1 on Arch Linux

GnomedDev avatar Feb 16 '25 21:02 GnomedDev

It looks like this query param was removed quite a while ago, but never removed from the docs. Is there a use case for this param being false that you have that we should discuss, or do we just need to update the docs to reflect the current state of things?

Rodentman87 avatar Mar 13 '25 16:03 Rodentman87

Just updating the docs would be fine, probably leaving a note about the removal.

GnomedDev avatar Mar 13 '25 17:03 GnomedDev