1. In your web browser, visit https://www.playstation.com/, click the "Sign In" button, and log in with a PSN account.

  2. In the same browser (due to a persisted cookie), visit https://ca.account.sony.com/api/v1/ssocookie. You will see a JSON response that looks something like:

{ "npsso": "<64 character token>" }

Copy your NPSSO.

If you see an error response, try using different browser.