You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-07-20 12:12:16

ehmd96
Member
Registered: 2022-07-20
Posts: 2

glpi rest api SESSION TOKEN EXPIRATION

Hello, I am using GLPI API for microservices project but I havent found nowhere in the documentation the default session token expiration delay. I would like to have that information to know when to refresh my session token for API calls. Thanks,

Bonjour, j'utilise l'API GLPI pour des projets microservice mais je ne vois nulle part dans la documentation le temps d'expiration par défaut du session token. J'aurais besoin de cette information pour savoir quand renouveler mon session token pour mes appels API. Merci par avance,

Offline

#2 2022-07-20 15:00:32

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,807
Website

Re: glpi rest api SESSION TOKEN EXPIRATION

If an API call returns a 401 error after a session was already started, it is likely that it expired and it could be used to try starting a new session.

Otherwise, I don't know when API sessions would expire. It is possible that it would be dependent on your PHP config.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2022-07-21 08:46:21

ehmd96
Member
Registered: 2022-07-20
Posts: 2

Re: glpi rest api SESSION TOKEN EXPIRATION

Hello @cconard96,

First of all, thank you for reaching out to me. I might implement a solution based on your inputs but temporarily.

However what I am trying to avoid is hitting the session token GLPI API endpoint for any request, reason why I want to learn more about their session token expiration policies so I can schedule a new session token retrievement only when it is needed and not call the endpoint anytime.

Thank you,

Offline

Board footer

Powered by FluxBB