---
title: Leggere il profilo
project: OpenAuth
version: 1.0
section: reference
language: it
license: MIT
url: https://totaljs.es/docs/it/openauth/1-0/reference/get-profile/
updated: 2026-11-19T09:22:04.896Z
---

# Leggere il profilo

> GET /sessions/ restituisce il profilo di un accesso completato.

```http
GET /sessions/?id=SESSION_ID
x-token: YOUR_APP_TOKEN
```

## Un profilo

Passa il tuo ID di sessione come `id` (oppure `sessionid`). Invia il [token dell'app](../../guides/app-tokens/) nell'header `x-token` oppure come argomento di query `token`.

```bash
curl -H "x-token: YOUR_APP_TOKEN" "https://auth.example.com/sessions/?id=7f3a9c21"
```

```json
{"id":"1001","name":"Jane Doe","firstname":"Jane","lastname":"Doe","email":"jane@example.com","photo":"","access_token":"...","expire":"2026-11-19T08:30:37.743Z","response":{"id":"1001","name":"Jane Doe"},"sessionid":"7f3a9c21","serviceid":"facebook"}
```

I campi sono descritti in [Il profilo dell'utente](../user-profile/).

Se l'utente non ha finito di accedere, la sessione è scaduta oppure l'ID è sconosciuto, OpenAuth risponde:

```json
[{"error":"Session not found"}]
```

con lo stato `404`.

Puoi rileggere lo stesso profilo finché la sessione non scade, 15 minuti dopo l'inizio dell'accesso. Salva ciò che ti serve nel tuo database.

## Tutti gli accessi completati

Senza `id`, OpenAuth restituisce un array con i profili di tutti gli accessi completati non ancora scaduti:

```bash
curl -H "x-token: YOUR_APP_TOKEN" "https://auth.example.com/sessions/"
```

```json
[{"id":"1001","name":"Jane Doe",...,"sessionid":"7f3a9c21","serviceid":"facebook"}]
```

Gli accessi ancora in corso non sono nell'elenco.
