# GET /api/auth/me

Canonical URL: https://developers.iagenify.com/pt/api/auth/me/
Language: pt

`GET https://api.iagenify.com/api/auth/me`

Return la conta pública recorde per l'autenticat.

Status: Bearer ou chave de API · JSON · read

## Requisição HTTP {#http}

```bash
curl https://api.iagenify.com/api/auth/me \
  -X GET \
  -H "Authorization: Bearer $IAGENIFY_TOKEN"
```

## JavaScript {#javascript}

```javascript
const response = await fetch("https://api.iagenify.com/api/auth/me", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);
```

## Python {#python}

```python
import os, requests

response = requests.request(
    "GET",
    "https://api.iagenify.com/api/auth/me",
    headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## Resposta bem-sucedida {#response}

```javascript
{ ok: true, user: { id: "…", email: "…", credits: 120 } }
```

L'obiet d'usuari è la rappresentantìa pubblica del cont. Tratât campi aggiuntivi come optional a meno che non siano documentati per vostra integrazion.

## Erros {#errors}

| Código | Significado |
| --- | --- |
| no_token | Nessuna parte di header d'autorizzazione supportata è stata inviata. |
| invalid_token | Il token portator è invalid. |
| session_expired | La sessione portatrice non è più attiva. |
| user_not_found | Il cont non è disponible. |
