Back to Node Auth0

Class ClientGrantsClient

docs/classes/management.SDK.ClientGrantsClient.html

5.9.19.6 KB
Original Source

Class ClientGrantsClient

Index

Accessors

organizations

Constructors

constructor

Methods

listcreategetdeleteupdate

Properties

_options_organizations

Accessors

organizations

get organizations(): OrganizationsClient

Returns OrganizationsClient

Constructors

constructor

new ClientGrantsClient(options: BaseClientOptions): ClientGrantsClient

Parameters

Returns ClientGrantsClient

Methods

list

list(
request?: ListClientGrantsRequestParameters,
requestOptions?: ClientGrantsClient.RequestOptions,
): Promise<
Page<
ClientGrantResponseContent,
ListClientGrantPaginatedResponseContent,
>,
>

Retrieve a list of client grants, including the scopes associated with the application/API pair.

Parameters

Request-specific configuration.

Returns Promise< Page< ClientGrantResponseContent, ListClientGrantPaginatedResponseContent, >, >

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.clientGrants.list({ from: "from", take: 1, audience: "audience", client_id: "client_id", allow_any_organization: true, subject_type: "client", default_for: "third_party_clients" })Copy

create

create(
request: CreateClientGrantRequestContent,
requestOptions?: ClientGrantsClient.RequestOptions,
): HttpResponsePromise<CreateClientGrantResponseContent>

Create a client grant for a machine-to-machine login flow. To learn more, read Client Credential Flow.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateClientGrantResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.clientGrants.create({ audience: "audience" })Copy

get

get(
id: string,
requestOptions?: ClientGrantsClient.RequestOptions,
): HttpResponsePromise<GetClientGrantResponseContent>

Retrieve a single client grant, including the scopes associated with the application/API pair.

Parameters

  • id: string

The ID of the client grant to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetClientGrantResponseContent>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.clientGrants.get("id")Copy

delete

delete(
id: string,
requestOptions?: ClientGrantsClient.RequestOptions,
): HttpResponsePromise<void>

Delete the Client Credential Flow from your machine-to-machine application.

Parameters

  • id: string

ID of the client grant to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.clientGrants.delete("id")Copy

update

update(
id: string,
request?: UpdateClientGrantRequestContent,
requestOptions?: ClientGrantsClient.RequestOptions,
): HttpResponsePromise<UpdateClientGrantResponseContent>

Update a client grant.

Parameters

  • id: string

ID of the client grant to update.

Request-specific configuration.

Returns HttpResponsePromise<UpdateClientGrantResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.clientGrants.update("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Protected_organizations

_organizations: OrganizationsClient | undefined

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Accessors organizations Constructors constructor Methods listcreategetdeleteupdate Properties _options_organizations