GET
/
v1
/
customer-portal
/
customers
/
me
Typescript (SDK)
import { Polar } from "@polar-sh/sdk";

const polar = new Polar();

async function run() {
  const result = await polar.customerPortal.customers.get({
    customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
  });

  console.log(result);
}

run();
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "email": "<string>",
  "email_verified": true,
  "name": "<string>",
  "billing_name": "<string>",
  "billing_address": {
    "line1": "<string>",
    "line2": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "US"
  },
  "tax_id": [
    "911144442",
    "us_ein"
  ],
  "oauth_accounts": {},
  "default_payment_method_id": "<string>"
}

Authorizations

Authorization
string
header
required

Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the Create Customer Session endpoint.

Response

200 - application/json

Successful Response

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

email
string
required
email_verified
boolean
required
name
string | null
required
billing_name
string | null
required
billing_address
object | null
required
tax_id
any[] | null
required
Required array length: 2 elements
Examples:
["911144442", "us_ein"]
["FR61954506077", "eu_vat"]
oauth_accounts
object
required
default_payment_method_id
string<uuid4> | null