mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]:API delete item return internal server error #5317
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 @jakikoske on GitHub (Dec 15, 2023).
Please describe your bug
When i'm trying to send an delete request for an item, i receive an internal server error.
API reference: http://localhost/Items/{itemId}
Jellyfin Version
10.8.z
if other:
10.8.13
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
Invoke-WebRequest : The remote server returned an error: (500) Internal Server Error.
Please attach any screenshots here
No response
Code of Conduct
@nielsvanvelzen commented on GitHub (Dec 15, 2023):
How did you authorize the request?
@jakikoske commented on GitHub (Dec 15, 2023):
Hi Niels,
I tried using the querystring ApiKey and with the header for authentication "mediabrowser token=".
Both didn't seem to work for me.
@nielsvanvelzen commented on GitHub (Dec 15, 2023):
Did you use a user access token? I believe this specific API does not work with api keys.
@jakikoske commented on GitHub (Dec 15, 2023):
indeed it works with the user auth. It was not clear to me that the API was not able to do this with just the apikey.
@felix920506 commented on GitHub (Dec 16, 2023):
Under this circumstance shouldn't it return a "401 Unauthorized" instead of a 5xx error?
@nielsvanvelzen commented on GitHub (Dec 16, 2023):
Yes but it's the Jellyfin API
@Schaka commented on GitHub (Feb 15, 2024):
Would you mind elaborating how to delete items?
Do I have to call the Authenticate Endpoint, remember the AccessToken and use that in the Authorization header?
@jakikoske commented on GitHub (Feb 15, 2024):
Hi i used the following api's:
to get the usertoken:
header contains the server auth token
"http://$ip/Users/$uid/Authenticate?pw=password" -Headers $headers -Method Post
to delete the item:
mediabrowser token is now the accesstoken of the previous request
"http://$ip:8096/Items/$id" -Headers $headers -Method Delete
@Schaka commented on GitHub (Feb 15, 2024):
In my case, I need to force
@jumoog commented on GitHub (Mar 9, 2024):
My understanding is that the API Token can perform all non-user specific functions. So from my point of view this is a bug.