@namespace BTCPayServer.Client @using BTCPayServer.Abstractions.Models @using BTCPayServer.Abstractions.TagHelpers @using BTCPayServer.TagHelpers @using Microsoft.AspNetCore.Html @using Microsoft.AspNetCore.Mvc.TagHelpers @inject Security.ContentSecurityPolicies Csp @model BTCPayServer.Controllers.UIManageController.ApiKeysViewModel @{ ViewData.SetActivePage(ManageNavPages.APIKeys, StringLocalizer["API Keys"]); Csp.UnsafeEval(); }

@ViewLocalizer["The {0} offers programmatic access to your instance. You can manage your BTCPay Server (e.g. stores, invoices, users) as well as automate workflows and integrations (see {1}). For that you need the API keys, which can be generated here. Find more information in the {2}.", Html.ActionLink(StringLocalizer["Greenfield API"], "SwaggerDocs", "UIHome", new { }, new { target = "_blank", rel = "noreferrer noopener" }), new HtmlString($"{StringLocalizer["use case examples"]}"), Html.ActionLink(StringLocalizer["API authentication docs"], "SwaggerDocs", "UIHome", null, null, "section/Authentication", new { }, new { target = "_blank", rel = "noreferrer noopener" })]

@if (Model.ApiKeyDatas.Any()) { @{ var index = 0; } @foreach (var keyData in Model.ApiKeyDatas) { index++; }
Label Key Permissions
@keyData.Label @keyData.Id @{ var permissions = keyData.GetBlob().Permissions; } @if (!permissions.Any()) { No permissions } else { @foreach (var permission in Permission.ToPermissions(permissions).Select(c => c.ToString()).Distinct().ToArray()) {
@permission
} }
Delete -
}
@section PageHeadContent { } @section PageFootContent { }