> ## Documentation Index
> Fetch the complete documentation index at: https://docs.localpayment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actualiser le jeton d'accès

Les jetons d'accès sont valables 60 minutes. Utilisez cet endpoint avec un jeton d'actualisation valide pour obtenir un nouveau jeton d'accès sans renvoyer vos identifiants.

> **Expiration du jeton d'actualisation**
>
> Les jetons d'actualisation expirent au bout de 120 minutes. Passé ce délai, demandez un nouveau jeton avec [Obtenir un jeton d'accès](https://docs.localpayment.com/fr/reference/get-token.md) à l'aide de votre nom d'utilisateur et de votre mot de passe.

> **Rotation des jetons**
>
> Chaque actualisation réussie renvoie une nouvelle paire `access` et `refresh`, et le jeton d'actualisation que vous avez envoyé cesse de fonctionner. Conservez les deux nouveaux jetons et utilisez le nouveau jeton d'actualisation la prochaine fois.
>
> Une nouvelle requête à [Obtenir un jeton d'accès](https://docs.localpayment.com/fr/reference/get-token.md) invalide également les jetons d'actualisation émis auparavant pour le même utilisateur et la même intégration (même `User-Agent`).

> **401 Invalid or expired token**
>
> Cette réponse signifie que le jeton d'actualisation a expiré ou a déjà été invalidé. Ne réessayez pas avec le même jeton d'actualisation. Demandez un nouveau jeton avec [Obtenir un jeton d'accès](https://docs.localpayment.com/fr/reference/get-token.md).


## OpenAPI

````yaml openapi/fr/localpayment.json POST /api/token/refresh/
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/token/refresh/:
    post:
      summary: Actualiser le jeton d'accès
      operationId: refresh-token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                refresh:
                  type: string
                  description: >-
                    Jeton d'actualisation obtenu à partir de la propriété
                    `refresh` dans la réponse des endpoints [Obtenir un jeton
                    d'accès](/fr/reference/get-token) ou [Actualiser le jeton
                    d'accès](/fr/reference/refresh-token).
              required:
                - refresh
              x-examples:
                Example 1:
                  refresh: '{{refresh}}'
            examples:
              200 - Refresh token:
                value:
                  refresh: >-
                    eyJ0eXAiOiJKV1QiLCJhbGccM5kYO7o4iOiJIU18jaiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTczNTMxOTkyOSwianRpIjoiZWUxMDE3MTUwY2JhNGM1NTg0MjYyZmRkZTdiOThiNGQiLCJ1c2VyX2lkIjoxMDAwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJybaCIsImV4cCI62xlcyI6WyJBTEwiXSwiY291bnRyaWVzIjpbIkFMTCJdLCJjb21wYW55IjoiQUxMIiwiY2xpZW50X2NvZGUiOiJBNzaW9uTEwiLCJwZXJtaXcyI6W119.6siymomkQ72yMvHGU9sMCO4h-cxpNgQXor
              '':
                value:
                  refresh: string
              500 - Server error.:
                value: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  refresh:
                    type: string
                    description: >-
                      Jeton d'actualisation utilisé pour obtenir un nouveau
                      jeton d'accès.
                  access:
                    type: string
                    description: >-
                      Jeton d'accès utilisé pour authentifier les requêtes vers
                      les services Localpayment. 
                required:
                  - refresh
                  - access
                x-examples:
                  Example 1:
                    refresh: >-
                      eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTczNTMyMTI5NSwianRpIjoiOGZhNmE4MTQyYmQ0NGNjNDhkNTFkOTJjY2I3NTVhZDgiLCJ1c2VyX2lkIjoxMDAwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJvdHAiOjExMTExMSwicm9sZXMiOlsiQUxMIl0sImNvdW50cmllcyI6WyJBTEwiXSwiY29tcGFueSI6IkFMTCIsImNsaWVudF9jb2RlIjoiQUxMIiwicGVybWlzc2lvbnMiOltdfQ.hMDLZYfR7aMYrFOz3y3LyHnoNldTd38VY-jsqqvsv70
                    access: >-
                      eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzM1MjM1MTk1LCJqdGkiOiI3MzBiYTdiMzMyMGU0NWU2ODk4ZGRjNWVlODY1YzEyNSIsInVzZXJfaWQiOjEwMDAsInN1cGVydXNlciI6dHJ1ZSwiaXNfc3RhZmYiOnRydWUsIm90cCI6MTExMTExLCJyb2xlcyI6WyJBTEwiXSwiY291bnRyaWVzIjpbIkFMTCJdLCJjb21wYW55IjoiQUxMIiwiY2xpZW50X2NvZGUiOiJBTEwiLCJwZXJtaXNzaW9ucyI6W119.peiX9q9Vw7Qm4Gq962gsST2UKs8LCE3C3VSq2vm4Bn0
              examples:
                200 - Refresh token:
                  value:
                    refresh: >-
                      eyJ0eXAiOiJKV1QiLCJhbGccM5kYO7o4iOiJIU18jaiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTczNTMxOTkyOSwianRpIjoiZWUxMDE3MTUwY2JhNGM1NTg0MjYyZmRkZTdiOThiNGQiLCJ1c2VyX2lkIjoxMDAwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJybaCIsImV4cCI62xlcyI6WyJBTEwiXSwiY291bnRyaWVzIjpbIkFMTCJdLCJjb21wYW55IjoiQUxMIiwiY2xpZW50X2NvZGUiOiJBNzaW9uTEwiLCJwZXJtaXcyI6W119.6siymomkQ72yMvHGU9sMCO4h-cxpNgQXor
                    access: >-
                      eyJ0eXAiOiJKV1QiLCJhbeyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiGciOiJIUzI1NiJ9.ZXhwIjoxNzM1MjM1MTk1LCJqdGkiOiI3MzBiYTdiMzMyMGU0NWU2ODk4ZGRjNWVlODY1YzEyNSIsInVzZXJfaWQiOjEwMDAsdXNlciI6dHJ1ZSwiaXNfc3RInN1cGVyhZmYiOnRydWUsIm90cCI6MTExMTExLCJyb2xlcyI6WyJBTEwiXSwiY291bnRyaWVzIjpbIkGUiOiJBTEwiLCJwZXJtaXNzaW9ucMTCJdLCJjb21wYW55IjoiQUxMIiwiY2xpZW50X2NvZyI6W119.peiX9q9Vw72UKs8LCE3C3VSq2vaQm4Gq962gsSTm4Bn0
        '401':
          description: Non autorisé
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Détails supplémentaires de la réponse.
                required:
                  - detail
                x-examples:
                  Example 1:
                    detail: Invalid or expired token
              examples:
                401 - Invalid or expired token:
                  value:
                    detail: Invalid or expired token
        '429':
          description: Trop de requêtes
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Détails supplémentaires de la réponse.
                required:
                  - detail
                x-examples:
                  Example 1:
                    detail: Request was throttled. Expected available in 30 seconds.
              examples:
                429 - Too many requests.:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
                429 - Request was throttled.:
                  value:
                    detail: Request was throttled.
        '500':
          description: Erreur interne du serveur
          content:
            text/html:
              schema:
                type: object
              examples:
                500 - Server error.:
                  value: |-
                    <!doctype html>
                    <html lang="en">

                    <head>
                    <title>Server Error (500)</title>
                    </head>

                    <body>
                    <h1>Server Error (500)</h1>
                    <p></p>
                    </body>

                    </html>
      security: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.