For the complete documentation index, see llms.txt. This page is also available as Markdown.

Login

user/login

POST https://public-api.timesafe.io/user/login

Questo servizio permette di ottenere un token JWT da usare per le chiamate successive.

Request Body

Name
Type
Description

ttl

string

Time To Live specifica in secondi la durata che il token generato deve avere. Può valere un minimo di 5 e un massimo di 86400, oppure "one-time". In questo caso il token non ha scadenza temporale, ma può essere usato una volta soltanto.

secret

string

password dell'utente

email

string

email o codice identificativo dell'utente.

{
    "status": "OK",
    "data": {
        "id": 374862,
        "cf": 11044930961,
        "email": "alan@timesafe.io",
        "sandbox": true,
        "status": "USER_LOGGED",
        "ttl": "one-time",  
        "issued": 1590561214,
        "token": "eyJhbGciOiAiSFMyNTYiLCJ0eXAiOiAiSldUIn0=.eyJpZCI6IjM3NDg2MiIsImNmIjoiMTEwNDQ5MzA5NjEiLCJlbWFpbCI6ImFsYW5AdGltZXNhZmUuaW8iLCJzYW5kYm94Ijp0cnVlLCJzdGF0dXMiOiJVU0VSX0xPR0dFRCIsInR0bCI6Im9uZS10aW1lIiwiaXNzdWVkIjoxNTkwNTYxMjE0fQ==.n3HcNb0jbqIVELGjOmrugUThGWCNdM8b+YHVlaamjlA="
    }
}
// WRONG PASSWORD
{
    "error": {
        "code": "Wrong password",
        "details": "Wrong password."
    }
}

// WRONG USER
{
    "error": {
        "code": "5_topi_invalidi",
        "details": "This email is not valid."
    }
}

// MISSING ARGUMENT
{
    "error": {
        "code": "3_asini_tristi",
        "details": "Missing argument email."
    }
}

Last updated

Was this helpful?