---
title: "Identifikimi"
page_id: "authentication"
section: "Si te fillosh"
canonical: "https://fature.al/api-reference/pages/authentication.html"
---

# Identifikimi

Part of the [fature.al API](/api-reference/index.html) documentation.

Te gjitha endpoint-et kerkojne identifikim. Nuk ka asnje endpoint publik.

## Token-i i perdoruesit

Token-i eshte i perdoruesit, jo i kompanise, dhe gjenerohet nga fature.al te
**Konfigurime > API Tokens**. Ai identifikon njeheresh perdoruesin dhe biznesin ne
emer te te cilit leshohen faturat.

```bash
Authorization: Bearer TOKEN_I_JUAJ
```

## Kredencialet e aplikacionit

Nje ofrues qe shet nje program per shume biznese merr edhe nje cift kredencialesh, te
cilat dergohen krahas token-it:

```bash
X-Client-Id: ft_id_...
X-Client-Secret: ft_sk_...
```

Te dyja bashke pergjigjen dy pyetjeve te ndryshme:

| Cfare dergoni | Cfare tregon |
| --- | --- |
| `Authorization` | **Kush** po e perdor programin |
| `X-Client-Id` me `X-Client-Secret` | **Cili program** po therret |

Kredencialet nuk e zevendesojne token-in dhe nuk hapin asnje te drejte me vete.

## Nje kerkese e plote

```bash
curl 'https://fature.al/api/v1/account' \
  -H 'Authorization: Bearer TOKEN_I_JUAJ' \
  -H 'X-Client-Id: ft_id_...' \
  -H 'X-Client-Secret: ft_sk_...' \
  -H 'Accept: application/json'
```

## Kur nuk kalon

- **`401`**: token-i mungon, eshte i gabuar ose eshte revokuar. Kontrolloni qe
  header-i quhet `Authorization` dhe qe fjala `Bearer` eshte para tij.
- **`403`**: token-i eshte i vlefshem, por llogaria nuk ka te drejten per kete
  veprim, ose abonimi ka mbaruar.

Kredencialet e derguara gabim refuzohen gjithmone me `401`, edhe kur dergimi i tyre
nuk eshte ende i detyrueshem per aplikacionin tuaj.

## Rotacioni

Kur nje sekret rrjedh, rotacioni e shfuqizon ate menjehere, pa periudhe mbivendosjeje.
Client id-ja mbetet e njejta, prandaj sherbimi juaj rifillon me nje vlere te vetme te
ndryshuar.
