Se connecter et obtenir un jeton
POST
https://api-v2.test.eldowallet.fr/auth/login
Échange un identifiant (username) et un mot de passe contre un jeton d'accès JWT, renvoyé dans token. Envoyez ensuite ce jeton dans l'en-tête Authorization: Bearer <jeton> de chaque requête.
À retenir
- Erreurs : mot de passe incorrect,
401 UNAUTHORIZED;usernameinconnu,404 MODEL_NOT_FOUND; compte non administrateur sans wallet,400 VALIDATION_ERROR. Le JWT expire : pour une intégration serveur à serveur, utilisez plutôt un jeton de wallet créé viaPOST /wallets/tokens, sans stocker de mot de passe.
Requête
header parameters
x-langstringLangue des messages d'erreur et des textes renvoyés : `fr` ou `en`.enum:en,frdefault:"en"
Body
application/json requiredusernamestring requiredpasswordstring required
Réponses
- 201
- 400
- 401
- 404
- 500
Schéma
application/jsontokenstring requiredJeton de l'utilisateur.example:1234567890
VALIDATION_ERROR · INVALID_JSON
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
UNAUTHORIZED
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
MODEL_NOT_FOUND
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
UNKNOWN_ERROR
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email