mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-22 22:39:42 -05:00
[GH-ISSUE #708] New API: /api/url #11716
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SmilerRyan on GitHub (Sep 1, 2024).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/708
New API: /api/url
Currently when using the json API, you have to send a POST request, parse the json response, then return the url from the json response. I would like to be able to directly send a GET request to the API and get redirected to the url, for cases where you need a direct URL to the file such as Discord bots etc.
Additional Context
For compatibility of other things that use direct links (such as Discord bots etc), this needs to be supported.
I would like to be able to use it like this example, but anything else is appreciated as well:
https://api.cobalt.tools/api/url?aFormat=best&isAudioOnly=true&url=https://youtu.be/wcT7zgL6gug
@lostdusty commented on GitHub (Sep 1, 2024):
i dont think thats a good design
@KwiatekMiki commented on GitHub (Sep 1, 2024):
why did you make 2 issues related to 1 thing
@SmilerRyan commented on GitHub (Sep 1, 2024):
I posted 2 issues since whilst both feel like they are needed for me, they are both different things.
One being to accept GET parameters instead of just POST parameters, and the other to have an endpoint that redirects to a video.
How would prefer to do this?
My initial thought before deciding on a different endpoint was an extra json such as
"redirectToUrl": true.If it exists to redirect instead of showing the json, but it feels more right to have a different endpoint to expect a url rather than json (url only at
/api/urlinstead of/api/jsonso it's less misleading).@wukko commented on GitHub (Sep 2, 2024):
duplicate of #707, see my reply there