Table of Contents

Interface IApiTokenResource

Namespace
Mailtrap.ApiTokens
Assembly
Mailtrap.Abstractions.dll

Represents a single API token resource.

public interface IApiTokenResource : IRestResource
Inherited Members

Methods

Delete(CancellationToken)

Permanently delete the API token represented by this resource.

Task Delete(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task

GetDetails(CancellationToken)

Get details of the API token represented by this resource.

Task<ApiToken> GetDetails(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<ApiToken>

API token details.

Reset(CancellationToken)

Reset the API token represented by this resource.

Task<ApiTokenResetResponse> Reset(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<ApiTokenResetResponse>

New API token details, including the full token value.

Remarks

Expires the requested token and creates a new token with the same permissions. The old token stops working after a short grace period. The response includes the new token value — store it securely; it is only returned once.