> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Info account

> Leggi l’identità account della credenziale corrente e la spesa dati cumulativa dalla registrazione.

**`GET`** `https://api-datahub.octoparse.com/v1/account`

Autenticazione: API key obbligatoria (`Authorization: Bearer <API Key>`).

Identità e spesa dati lifetime dell’account dietro la credenziale corrente. Questo endpoint non ha dimensione temporale. Per spesa per periodo e dimensione usa <a href="/docs/it/datahub/api/reference/account/get-billing">Aggregazione fatturazione</a>.

`total_spent` è solo data fee — l’importo fatturato dalle tabelle prezzi app sull’output delle run. Saldo wallet, top-up e fatture sono fuori dall’API Data Hub; controlla il centro account Octoparse. Ogni API key dello stesso account vede lo stesso totale lifetime.

## Richiesta

### Esempio di richiesta

```bash theme={null}
curl   -H "Authorization: Bearer $OCTOPARSE_API_KEY"   "https://api-datahub.octoparse.com/v1/account"
```

## Risposta

### 200 successo

```json theme={null}
{
  "data": {
    "user_id": "user-carol",
    "username": "carol",
    "total_spent": 0.06,
    "currency": "USD"
  }
}
```

Il payload è wrappato in `data`. Campi:

<ResponseField name="user_id" type="string" required>
  ID account stabile.
</ResponseField>

<ResponseField name="username" type="string">
  Nome utente attuale, che è anche il primo segmento delle app che pubblichi come `<username>/<app_name>`. `null` se non impostato.
</ResponseField>

<ResponseField name="total_spent" type="number" required>
  Spesa dati cumulativa.
</ResponseField>

<ResponseField name="currency" type="string">
  Valuta.
</ResponseField>

### Errori

| HTTP | `code`         | `category`  | Descrizione                    |
| ---- | -------------- | ----------- | ------------------------------ |
| 401  | `unauthorized` | `forbidden` | API key mancante o non valida. |

Le risposte di errore usano `{"error": {code, category, message, retryable}}`. Vedi <a href="/docs/it/datahub/api/reference/introduction#errors">Errori</a>.

## Librerie client

<CodeGroup>
  ```python Python theme={null}
  info = client.account()
  print(info["username"], info["total_spent"], info["currency"])
  ```

  ```js JavaScript theme={null}
  const info = await client.account();
  console.log(info.username, info.total_spent, info.currency);
  ```
</CodeGroup>
