title: Plex how to get the claim token with CLI
body: <p>I'm getting issue when I try to claim the token throught cli. In the normal way you access <a href="https://www.plex.tv/claim/" rel="nofollow noreferrer">https://www.plex.tv/claim/</a> and get the token, if not logged you'll need to log in with your account. I'm wondering it it's possible to get the claim token giving the <code>username</code> and <code>password</code>.</p>
  
  <p>First, I need to log in and get the auth token. I have made this command in cURL :</p>
  
  <pre><code>curl -X "POST" "https://plex.tv/users/sign_in.json" -H "X-Plex-Version: 1.0.0" -H "X-Plex-Product: WHATEVER" -H "X-Plex-Client-Identifier: YOUR-PRODUCT-ID" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" --data-urlencode "user[password]=PASSWORD" --data-urlencode "user[login]=LOGIN-OR-EMAIL"
  </code></pre>
  
  <p>It output something like :</p>
  
  <pre><code>{  
     "user":{  
        "id":234612345,
        "uuid":"c59ae6a4785ea41",
        "email":"mail@domain",
        "joined_at":"2019-01-13T14:20:05.000Z",
        "username":"userA",
        "title":"userA",
        "thumb":"https://plex.tv/users/c19ae7c44546aa41/avatar?c=1557225551",
        "hasPassword":true,
        "authToken":"ysdfzerk47qnCSm7zYqzEAZIds4VF3b",
        "authentication_token":"ysdfzerk47qnCSm7zYqzEAZIds4VF3b",
        "subscription":{  
           "active":false,
           "status":"Inactive",
           "plan":null,
           "features":[  
              "adaptive_bitrate",
              "collections",
              "photos-metadata-edition",
              "radio",
              "photos-favorites",
              "federated-auth",
              "Android - PiP",
              "publishing_platform",
              "news",
              "kevin-bacon",
              "client-radio-stations",
              "TREBLE-show-features",
              "web_server_dashboard",
              "conan_redirect_qa",
              "conan_redirect_alpha",
              "conan_redirect_beta",
              "conan_redirect_public",
              "news_local_now",
              "transcoder_cache",
              "artist-tv"
           ]
        },
        "roles":{  
           "roles":[  
  
           ]
        },
        "entitlements":[  
  
        ],
        "confirmedAt":null,
        "forumId":null,
        "rememberMe":false
     }
  }
  </code></pre>
  
  <p>How can I claim the token now ? I don't found any api to get that token. We can only get from the website <a href="https://www.plex.tv/claim/" rel="nofollow noreferrer">https://www.plex.tv/claim/</a></p>
  
  <p>The token is like : claim-XXXXXXXXXXXXXXXXXXXX</p>
  
  <p>I can't find the token in the source page</p>