Get information about the authenticated user.
Typescript
import { Polar } from "@polar-sh/sdk"; const polar = new Polar({ accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", }); async function run() { const result = await polar.oauth2.userinfo(); console.log(result); } run();
{ "sub": "<string>", "name": "<string>", "email": "<string>", "email_verified": true }
You can generate an Organization Access Token from your organization's settings.
Successful Response
Was this page helpful?