Skip to content

fix: request JSON explicitly from Plex API v2 endpoints - #72

Open
ryansese wants to merge 1 commit into
vanchaxy:mainfrom
ryansese:auth-fix
Open

ryansese wants to merge 1 commit into
vanchaxy:mainfrom
ryansese:auth-fix

Conversation

@ryansese

Copy link
Copy Markdown

Plex's /api/v2 endpoints default to returning XML unless the request sends Accept: application/json. Without it, axios receives an XML string instead of a parsed object, so authPin.id/authPin.code end up undefined during login, producing a redirect to Plex's auth page with code=undefined and the generic "We were unable to complete this request" error.

Plex's /api/v2 endpoints default to returning XML unless the request
sends Accept: application/json. Without it, axios receives an XML
string instead of a parsed object, so authPin.id/authPin.code end up
undefined during login, producing a redirect to Plex's auth page with
code=undefined and the generic "We were unable to complete this
request" error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant