Jellyfin Forum
SOLVED: (API) Running into an error when attempting to GET details for item id - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: (API) Running into an error when attempting to GET details for item id (/t-solved-api-running-into-an-error-when-attempting-to-get-details-for-item-id)



(API) Running into an error when attempting to GET details for item id - OivaJS - 2024-04-08


.txt   logs.txt (Size: 2.79 KB / Downloads: 16)
Code:
curl -v -X GET 'localhost:8096/emby/Items/6062205f8327b080b03b2b510d267cb7?api_key=my-key' -H 'X-Emby-Token: my-key'

Results in

Code:
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Content-Length: 0
< Date: Mon, 08 Apr 2024 11:08:03 GMT
< Server: Kestrel
< Allow: DELETE, POST
< X-Response-Time-ms: 10

As you can see, I am making the request directly to make sure the issue is not caused by nginx. (as the server resides in my home network)
Yet still, only DELETE and POST are allowed, which is peculiar to me, and I ran into a dead end trying to figure out why this might happen.

My configuration runs version 10.8.13 on debian AArch64.

Some notes about my process to try and find a solution:
- Item id exists and is correct (triple checked)
- API key is correct and operational
- Jellyfin interface is accessible without any problems
- Nothing catches my eye in the logfile of Jellyfin

here are anyways the logs from the time

.txt   logs.txt (Size: 2.79 KB / Downloads: 16)

I thank you for your time! - O


RE: (API) Running into an error when attempting to GET details for item id - niels - 2024-04-08

Few problems:

- The URL starts with "/emby", this is invalid (unless you've manually configured this to be your base-url in Jellyfin or do reverse proxy magic)
- The api_key query parameter is deprecated - it still works but don't use it
- The X-Emby-Token header is deprecated - it still works but don't use it
- You added authorization twice (query/header)
- There is no GET operation for this specific route, the GetItem operation requires a user-id in 10.8, add it as a query parameter

A more correct request would look like this:


curl -v -X GET 'localhost:8096/Users/{userId}/Items/6062205f8327b080b03b2b510d267cb7' -H 'Authorization: MediaBrowser Token="my-key"'


Additional references:
- https://gist.github.com/nielsvanvelzen/ea047d9028f676185832e51ffaf12a6f
- https://api.jellyfin.org/#tag/Items/operation/GetItem


RE: (API) Running into an error when attempting to GET details for item id - OivaJS - 2024-04-08

Thank you so much! This made so many things much clearer for me and just generally helped me a bunch. - O