Nurama Developers
Namespaces

oauthGrant

Methods and types of the `oauthGrant` namespace (`client.oauthGrant` / `bot.oauthGrant`).

Interfaces

OAuthGrantSummary

One application a user has authorised over OAuth.

A grant is the record of consent: the scopes approved, and the tie binding every token issued under it. Revoking one withdraws the application's access.

Properties

PropertyTypeDescription
clientIdstring | null-
clientNamestring | nullThe application's name. Chosen by the application itself when verified is false — treat it as display text from an untrusted source, never as identification.
expiresAtstring | null-
grantedAtstring-
grantIdstringOpaque identifier; pass to revokeGrant.
scopesstring[]Scopes the user approved, from the backend's token-scope registry.
verifiedbooleanWhether Nurama configured this application. False for one that registered itself through Dynamic Client Registration: it picked its own name and nobody reviewed it.

Functions

default()

function default(client): {
  listGrants: Promise<OAuthGrantSummary[]>;
  revokeGrant: Promise<void>;
};

Parameters

ParameterType
clientdefault

Returns

NameTypeDescription
listGrants()() => Promise<OAuthGrantSummary[]>List the applications the caller has authorised, newest first. Expired grants are omitted by the server.
revokeGrant()(grantId) => Promise<void>Withdraw an application's access: the grant and every token issued under it. An access token already in flight stays valid until it expires, so revocation is not instantaneous for a request under way.

On this page