Token API

Servono agli agenti (Cursor, Claude Code, Codex) per lavorare sul CRM. Il valore in chiaro si vede una sola volta.

<% if @revealed_token.present? %>

Nuovo token — copialo ora

Non verrà più mostrato. Incollalo in CRM_API_TOKEN nella config MCP.

<%= @revealed_token %>
<% end %>

Nuovo token

<%= form_with url: api_tokens_path, method: :post, class: "mt-4 flex flex-col gap-3 sm:flex-row sm:items-end" do %>
<%= text_field_tag :name, nil, placeholder: "es. Cursor sul portatile", required: true, class: input_class %>
<%= submit_tag "Crea token", class: "#{btn_primary} sm:mb-0" %> <% end %>
<% if @api_tokens.empty? %>

Nessun token attivo.

<% else %> <% end %>