IUserApiTokensService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Service for managing API tokens of the current user.
export interface IUserApiTokensService
Methods
Method | Description |
|---|---|
(ALPHA) Create an API token. | |
(ALPHA) Delete an API token. | |
(ALPHA) Get all API tokens of the user. The result does not contain the token secrets. |
Method details
IUserApiTokensService.create()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Create an API token.
create(id: string): Promise<IApiTokenWithSecret>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | identifier of the new token |
Returns
Promise<IApiTokenWithSecret>
the token with its secret; the secret cannot be read again later
IUserApiTokensService.delete()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Delete an API token.
delete(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | identifier of the token |
Returns
Promise<void>
IUserApiTokensService.getAll()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Get all API tokens of the user. The result does not contain the token secrets.
getAll(): Promise<IApiToken[]>;
Returns
Promise<IApiToken[]>