Jellyfin Forum
Jellyfin API problem - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: Jellyfin API problem (/t-jellyfin-api-problem)



Jellyfin API problem - polishgrompl - 2024-12-05

I have a problem with accessing the jellyfin api. I generated the key and I tried command: curl -X GET "http://[IP ADDRESS]/Users/83f0854e86474a2d8e028f69687e6846/PlayingItem"  -H "Authorization: Bearer [KEY]". But it gave me 401 error - unauthorized. I tried also with  curl -X GET "http://[IP ADDRESS]/Users/Public"  -H "Authorization: Bearer [KEY]" and it worked fine. So it seems like privileges/rights problem.
I tried to search API Privileges or smth, but can't find it. I'm using Jellyfin 10.10.3 and nginx reverse proxy. What should I do now?


RE: Jellyfin API problem - crobibero - 2024-12-05

Jellyfin doesn’t use Bearer auth. The /Users/Public endpoint worked for you because it doesn’t require auth.

https://gist.github.com/nielsvanvelzen/ea047d9028f676185832e51ffaf12a6f


RE: Jellyfin API problem - polishgrompl - 2024-12-06

(2024-12-05, 11:41 PM)crobibero Wrote:
Jellyfin doesn’t use Bearer auth. The /Users/Public endpoint worked for you because it doesn’t require auth.

https://gist.github.com/nielsvanvelzen/ea047d9028f676185832e51ffaf12a6f



Thanks for a reply. I figured out by myself what is wrong and you are right. I'm new to jellyfin API and was using ChatGPT for help with commands. It misled me. I changed the command to:

curl -X GET "https://[IP]/Users/83f0854e86474a2d8e028f69687e6846" -H "X-Emby-Authorization: MediaBrowser Client=\"Test\", Device=\"curl\", DeviceId=\"1234\", Version=\"1.0.0\", Token=\"[TOKEN ID]\""

And it's working fine rn.