Unauthorized Access when requesting token

Server Version#:1.32.1
Player Version#:

I have installed Plex on my QNAP TS-253D. After installation I logged into Plex and tried to access the site from my local network and received Not authorized. You do not have access to this server. I followed the directions below with no luck.

    1. Make sure your Plex Media Server in running (you can check it from QTP app center )
      2.Install a SSH client o your PC. (Like https://www.putty.org/
  1. Connect to your QNAP by SSH
  2. Login with your qnap local account (admin by default) and password on ssh
  3. Open https://www.plex.tv/ from your PC browser
  4. Login with your Plex account
  5. Open https://plex.tv/claim from your PC browser. You will get a Claim Code from Plex associated with your Plex account. This code is valid for 5 minutes
  6. Back to your SSH session and run the following: ‘curl -X POST http://127.0.0.1:32400/myplex/claim?tok … TOKEN_HERE’. It will be something like
curl -X POST http://qnap451:32400/myplex/claim?token=claim-syVaZoKPyn3V-TAUzt7Z
  1. The claim process could take 10-20 seconds. Once done, you will get output like: ‘<MyPlex authToken=“xxxxxxxxxxxxx” username=“xxxxxxxxxxxxx” mappingState=“mapped”…’
  • Instead of seeing the output in step 9 I received the following error…Unauthorized

    401 Unauthorized

Please let me know what I can try next or if I am missing a step somewhere.

curl requires quotes around the URL when there are query parameters.

curl -X POST "http://qnap451:32400/myplex/claim?token=claim-XXXXXXXXXXXXXXXXXXXX"

I was hoping it was that simple but doesn’t look like it. I put in the following expect the IP address instead of qnap451 and my claim code instead of XXXXXXXXXX.

curl -X POST “http://qnap451:32400/myplex/claim?token=claim-XXXXXXXXXXXXXXXX

I received the following…


<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></b

When I try…
curl -X POST “http://localhost:32400/myplex/claim?token=claim-XXXXXXXXXXXXXXXXXXXX

I receive a 500 Internal Server Error message.

Solved on the QNAP board. I needed to use the following…
curl -X POST “http://127.0.0.1:32400/myplex/claim?token=XXXXXXXXXXXXX

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.