Skip to main content
GET
/
v1
/
oauth2
/
authorize
Python (SDK)
from polar_sdk import Polar


with Polar(
    access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

    res = polar.oauth2.authorize()

    # Handle response
    print(res)
{
  "client": {
    "created_at": "2023-11-07T05:31:56Z",
    "modified_at": "2023-11-07T05:31:56Z",
    "client_id": "<string>",
    "client_name": "<string>",
    "client_uri": "<string>",
    "logo_uri": "<string>",
    "tos_uri": "<string>",
    "policy_uri": "<string>"
  },
  "sub_type": "<string>",
  "sub": {
    "id": "<string>",
    "email": "[email protected]",
    "avatar_url": "<string>"
  },
  "scopes": [
    "openid"
  ],
  "scope_display_names": {
    "openid": "OpenID",
    "profile": "Read your profile",
    "email": "Read your email address",
    "web:read": "Web Read Access",
    "web:write": "Web Write Access",
    "user:read": "User Read",
    "user:write": "Delete your user account",
    "organizations:read": "Read your organizations",
    "organizations:write": "Create or modify organizations",
    "custom_fields:read": "Read custom fields",
    "custom_fields:write": "Create or modify custom fields",
    "discounts:read": "Read discounts",
    "discounts:write": "Create or modify discounts",
    "checkout_links:read": "Read checkout links",
    "checkout_links:write": "Create or modify checkout links",
    "checkouts:read": "Read checkout sessions",
    "checkouts:write": "Create or modify checkout sessions",
    "transactions:read": "Read transactions",
    "transactions:write": "Create or modify transactions",
    "payouts:read": "Read payouts",
    "payouts:write": "Create or modify payouts",
    "products:read": "Read products",
    "products:write": "Create or modify products",
    "benefits:read": "Read benefits",
    "benefits:write": "Create or modify benefits",
    "events:read": "Read events",
    "events:write": "Create events",
    "meters:read": "Read meters",
    "meters:write": "Create or modify meters",
    "files:read": "Read file uploads",
    "files:write": "Create or modify file uploads",
    "subscriptions:read": "Read subscriptions made on your organizations",
    "subscriptions:write": "Create or modify subscriptions made on your organizations",
    "customers:read": "Read customers",
    "customers:write": "Create or modify customers",
    "members:read": "Read members",
    "members:write": "Create or modify members",
    "wallets:read": "Read wallets",
    "wallets:write": "Create or modify wallets",
    "disputes:read": "Read disputes",
    "customer_meters:read": "Read customer meters",
    "customer_sessions:write": "Create or modify customer sessions",
    "customer_seats:read": "Read customer seats",
    "customer_seats:write": "Create or modify customer seats",
    "orders:read": "Read orders made on your organizations",
    "orders:write": "Modify orders made on your organizations",
    "refunds:read": "Read refunds made on your organizations",
    "refunds:write": "Create or modify refunds",
    "payments:read": "Read payments made on your organizations",
    "metrics:read": "Read metrics",
    "webhooks:read": "Read webhooks",
    "webhooks:write": "Create or modify webhooks",
    "external_organizations:read": "Read external organizations",
    "license_keys:read": "Read license keys",
    "license_keys:write": "Modify license keys",
    "customer_portal:read": "Read your orders, subscriptions and benefits",
    "customer_portal:write": "Create or modify your orders, subscriptions and benefits",
    "notifications:read": "Read notifications",
    "notifications:write": "Mark notifications as read",
    "notification_recipients:read": "Read notification recipients",
    "notification_recipients:write": "Create or modify notification recipients"
  }
}

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Response

200 - application/json

Successful Response

client
OAuth2ClientPublic · object
required
sub_type
string
required
Allowed value: "user"
sub
AuthorizeUser · object
required
scopes
enum<string>[]
required
Available options:
openid,
profile,
email,
user:read,
user:write,
web:read,
web:write,
organizations:read,
organizations:write,
custom_fields:read,
custom_fields:write,
discounts:read,
discounts:write,
checkout_links:read,
checkout_links:write,
checkouts:read,
checkouts:write,
transactions:read,
transactions:write,
payouts:read,
payouts:write,
products:read,
products:write,
benefits:read,
benefits:write,
events:read,
events:write,
meters:read,
meters:write,
files:read,
files:write,
subscriptions:read,
subscriptions:write,
customers:read,
customers:write,
members:read,
members:write,
wallets:read,
wallets:write,
disputes:read,
customer_meters:read,
customer_sessions:write,
customer_seats:read,
customer_seats:write,
orders:read,
orders:write,
refunds:read,
refunds:write,
payments:read,
metrics:read,
webhooks:read,
webhooks:write,
external_organizations:read,
license_keys:read,
license_keys:write,
repositories:read,
repositories:write,
issues:read,
issues:write,
customer_portal:read,
customer_portal:write,
notifications:read,
notifications:write,
notification_recipients:read,
notification_recipients:write
scope_display_names
Scope Display Names · object