Table of Contents

Interface IApiTokenCollectionResource

Namespace
Mailtrap.ApiTokens
Assembly
Mailtrap.Abstractions.dll

Represents API token collection resource.

public interface IApiTokenCollectionResource : IRestResource
Inherited Members

Methods

Create(CreateApiTokenRequest, CancellationToken)

Create a new API token.

Task<CreateApiTokenResponse> Create(CreateApiTokenRequest request, CancellationToken cancellationToken = default)

Parameters

request CreateApiTokenRequest

API token creation request.

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<CreateApiTokenResponse>

Created API token details, including the full token value.

Remarks

The full token value is only returned once at creation — store it securely.

GetAll(CancellationToken)

List all API tokens visible to the current API token.

Task<IList<ApiToken>> GetAll(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<IList<ApiToken>>

Collection of API token details.