(oauth2.clients)
List OAuth2 clients.
from polar_sdk import Polar
s = Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.oauth2.clients.list()
if res is not None:
while True:
# handle items
res = res.next()
if res is None:
break
Parameter |
Type |
Required |
Description |
page |
Optional[int] |
➖ |
Page number, defaults to 1. |
limit |
Optional[int] |
➖ |
Size of a page, defaults to 10. Maximum is 100. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.Oauth2ClientsListResponse
Error Type |
Status Code |
Content Type |
models.HTTPValidationError |
422 |
application/json |
models.SDKError |
4XX, 5XX |
*/* |
Create an OAuth2 client.
from polar_sdk import Polar
s = Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.oauth2.clients.create(request={
"redirect_uris": [
"https://probable-heating.com/",
],
"client_name": "<value>",
})
if res is not None:
# handle response
pass
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
s = Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.oauth2.clients.get(client_id="<value>")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
client_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
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
s = Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.oauth2.clients.update(client_id="<value>", o_auth2_client_configuration_update={
"redirect_uris": [
"https://passionate-flu.org",
],
"client_name": "<value>",
"client_id": "<value>",
})
if res is not None:
# handle response
pass
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
s = Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.oauth2.clients.delete(client_id="<value>")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
client_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
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 |
*/* |