(oauth2.clients)
Create an OAuth2 client.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.oauth2.clients.create(request={
"redirect_uris": [
"https://impolite-hippodrome.com/",
"https://acidic-tomography.net/",
],
"client_name": "<value>",
})
# Handle response
print(res)
Any
| Error Type | Status Code | Content Type |
|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Get an OAuth2 client by Client ID.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.oauth2.clients.get(client_id="<id>")
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
client_id | str | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Any
| Error Type | Status Code | Content Type |
|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Update an OAuth2 client.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.oauth2.clients.update(client_id="<id>", o_auth2_client_configuration_update={
"redirect_uris": [
"https://classic-cantaloupe.org",
"https://corrupt-status.biz/",
],
"client_name": "<value>",
"client_id": "<id>",
})
# Handle response
print(res)
Any
| Error Type | Status Code | Content Type |
|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Delete an OAuth2 client.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.oauth2.clients.delete(client_id="<id>")
# Handle response
print(res)
| Parameter | Type | Required | Description |
|---|
client_id | str | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Any
| Error Type | Status Code | Content Type |
|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |