Skip to content

oauth2

Accessed as client.user.applications.oauth2; the async client mirrors it.

UserApplicationsOauth2

The user.applications.oauth2 namespace.

create

create(
    *, confidential_client: bool | None = None, name: str | None = None, redirect_uris: list[str] | None = None
) -> OAuth2Application

Creates a new OAuth2 application.

Parameters:

Name Type Description Default
confidential_client bool | None
None
name str | None
None
redirect_uris list[str] | None
None

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCreateOAuth2Application

delete

delete(id: int) -> None

Delete an OAuth2 application.

Parameters:

Name Type Description Default
id int

token to be deleted

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userDeleteOAuth2Application

get

get(id: int) -> OAuth2Application

Get an OAuth2 application.

Parameters:

Name Type Description Default
id int

Application ID to be found

required

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userGetOAuth2Application

list

list(*, page: int | None = None, limit: int | None = None) -> Paginated[OAuth2Application]

List the authenticated user's oauth2 applications.

Parameters:

Name Type Description Default
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[OAuth2Application]

OAuth2ApplicationList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userGetOAuth2Applications

update

update(
    id: int, *, confidential_client: bool | None = None, name: str | None = None, redirect_uris: list[str] | None = None
) -> OAuth2Application

Update an OAuth2 application, this includes regenerating the client secret.

Parameters:

Name Type Description Default
id int

application to be updated

required
confidential_client bool | None
None
name str | None
None
redirect_uris list[str] | None
None

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userUpdateOAuth2Application

AsyncUserApplicationsOauth2

The user.applications.oauth2 namespace.

create

create(
    *, confidential_client: bool | None = None, name: str | None = None, redirect_uris: list[str] | None = None
) -> OAuth2Application

Creates a new OAuth2 application.

Parameters:

Name Type Description Default
confidential_client bool | None
None
name str | None
None
redirect_uris list[str] | None
None

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCreateOAuth2Application

delete

delete(id: int) -> None

Delete an OAuth2 application.

Parameters:

Name Type Description Default
id int

token to be deleted

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userDeleteOAuth2Application

get

get(id: int) -> OAuth2Application

Get an OAuth2 application.

Parameters:

Name Type Description Default
id int

Application ID to be found

required

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userGetOAuth2Application

list

list(*, page: int | None = None, limit: int | None = None) -> AsyncPaginated[OAuth2Application]

List the authenticated user's oauth2 applications.

Parameters:

Name Type Description Default
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[OAuth2Application]

OAuth2ApplicationList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userGetOAuth2Applications

update

update(
    id: int, *, confidential_client: bool | None = None, name: str | None = None, redirect_uris: list[str] | None = None
) -> OAuth2Application

Update an OAuth2 application, this includes regenerating the client secret.

Parameters:

Name Type Description Default
id int

application to be updated

required
confidential_client bool | None
None
name str | None
None
redirect_uris list[str] | None
None

Returns:

Type Description
OAuth2Application

OAuth2Application.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userUpdateOAuth2Application