Skip to main content

Authentication

The Smart Finance API uses a Bearer Token to authenticate every request. Each token is issued for a Workspace and automatically scopes the data returned.

Getting the token

Generate tokens in the platform interface, under Integrations → API Token. Each token has:

  • A public UUID Identifier for tracking.
  • A Secret shown only once at creation time — copy it and keep it somewhere safe.
  • Scopes that limit which resources the token can access.
  • An optional Expiration.

How to send the token

Include the Authorization: Bearer <token> header on every request.

export KOBANA_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx

curl -i \
-H "Authorization: Bearer $KOBANA_TOKEN" \
-H 'Content-Type: application/json' \
-H 'User-Agent: My System (contact@mycompany.com)' \
-X GET 'https://api.finance.kobana.com.br/v1/financial-accounts'

Scopes

Each token must declare the scopes it needs. One per resource, in read/write pairs:

ResourceReadWrite
Financial accountsfinance.accountsfinance.accounts.write
Bank catalogfinance.banks— (read-only)
Payablesfinance.payablesfinance.payables.write
Sending a payable to the bankfinance.payables.dispatch
Receivablesfinance.receivablesfinance.receivables.write
Issuing and cancelling a charge (bank slip/Pix)finance.receivables.charge
Payment receiptsfinance.receipts— (read-only)
Transactionsfinance.transactionsfinance.transactions.write (includes transfers)
Reconciliationsfinance.reconciliationsfinance.reconciliations.write (create and dissolve)
Projected cash flowfinance.cash_flow— (read-only)
Companiesfinance.companiesfinance.companies.write
Peoplefinance.peoplefinance.people.write
Categoriesfinance.categoriesfinance.categories.write
Classification centersfinance.cost_centersfinance.cost_centers.write
Automatic rulesfinance.automatic_rulesfinance.automatic_rules.write (includes reordering)
Taxesfinance.taxesfinance.taxes.write
Attachmentsfinance.attachmentsfinance.attachments.write (upload and management)
Wildcardfinance.all (all reads)finance.all.write (everything)

Resolution rules:

  • A .write scope includes reading the same resource — there is no need to grant both.
  • finance.all grants all reads, and no writes. finance.all.write grants everything.
  • finance.receipts lists receipts but does not download the document: download_url points at the attachments resource, so fetching the bytes also requires finance.attachments.
warning

Money scopes are kept separate for security. finance.payables.dispatch (sending to the bank) and finance.receivables.charge (issuing a charge) are never granted alongside .write by default, and the read-only wildcard finance.all does not satisfy them — only the exact grant or finance.all.write does. That way a read-only token can neither move money nor bill anybody.

Best practices

  • Never commit tokens to git. Use environment variables or secret vaults (AWS Secrets Manager, Vault, etc.).
  • Use distinct tokens per integration — this makes it easy to rotate/revoke without taking everything down.
  • Set the minimum scopes required (principle of least privilege).
  • Revoke any leaked token immediately.
  • Always point at https:// — calls on port 80 are redirected to 443, but clients do not resend the body on a redirect.