Vai al contenuto principale
POST
/
token
Genera un token di accesso temporaneo
curl --request POST \
  --url https://api.altostrat.io/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "expire_after_minutes": 60
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "type": "jwt",
  "expires_in_minutes": 60,
  "expires_at": "2025-10-21T13:00:00.000000Z",
  "short_link": "https://altostr.at/aBcDeFg"
}

Authorizations

Authorization
string
header
required

Le richieste API sono autenticate utilizzando un JSON Web Token (JWT) fornito nell'header Authorization.

Body

application/json

Specifica la durata di validità del token.

expire_after_minutes
integer
required

Il numero di minuti a partire da ora dopo i quali il token scadrà.

Required range: 1 <= x <= 43200
Example:

60

Response

Il token di accesso generato e i suoi metadati.

Un oggetto token di accesso temporaneo.

token
string

Il JSON Web Token.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"

type
string

Il tipo di token.

Example:

"jwt"

expires_in_minutes
integer

Il numero di minuti prima che il token scada.

Example:

60

expires_at
string<date-time>

Il timestamp esatto in cui il token scadrà.

Example:

"2025-10-21T13:00:00.000000Z"

Un URL abbreviato che incorpora il token per una facile condivisione.

Example:

"https://altostr.at/aBcDeFg"