Interface OauthTokensAPI

interface OauthTokensAPI {
    clearCache: () => void;
    deleteOauthToken: (
        tokenId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteOauthTokenHttpResponse>;
    getOauthTokens: (
        query: {
            limit?: number;
            page?: string;
            sort?: "userId";
            userId?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetOauthTokensHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for oauth-tokens api requests.

Type declaration

    • (): void
    • Clears the cache for oauth-tokens api requests.

      Returns void

deleteOauthToken: (
    tokenId: string,
    options?: ApiCallOptions,
) => Promise<DeleteOauthTokenHttpResponse>

Revokes a specific OAuth token by ID. Requesting user must have TenantAdmin role assigned to delete tokens owned by other users.

Type declaration

The ID of the token to revoke.

DeleteOauthTokenHttpError

getOauthTokens: (
    query: {
        limit?: number;
        page?: string;
        sort?: "userId";
        userId?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetOauthTokensHttpResponse>

Retrieve list of OAuth tokens that the user has access to. Users assigned with a TenantAdmin role can list OAuth tokens generated for all users in the tenant.

Type declaration

    • (
          query: {
              limit?: number;
              page?: string;
              sort?: "userId";
              userId?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetOauthTokensHttpResponse>
    • Retrieve list of OAuth tokens that the user has access to. Users assigned with a TenantAdmin role can list OAuth tokens generated for all users in the tenant.

      Parameters

      • query: { limit?: number; page?: string; sort?: "userId"; userId?: string }

        an object with query parameters

        • Optionallimit?: number

          The maximum number of tokens to return.

        • Optionalpage?: string

          The target page.

        • Optionalsort?: "userId"

          The field to sort by.

        • OptionaluserId?: string

          The ID of the user to limit results to.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetOauthTokensHttpResponse>

      GetOauthTokensHttpError

an object with query parameters

GetOauthTokensHttpError