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

# Refresh the Access Token

> Use this endpoint to renew an expired access token with a valid refresh token.



## OpenAPI

````yaml /en/openapi/v3-current/AM-auth.yaml post /v1/login/oauth/refresh_token
openapi: 3.1.0
info:
  title: Auth Plugin
  description: ''
  version: 2.6.5
servers:
  - url: https://auth.sandbox.lerian.net
security: []
tags:
  - name: Authentication API
  - name: MFA API
  - name: User Information API
  - name: Authorization API
paths:
  /v1/login/oauth/refresh_token:
    post:
      tags:
        - Authentication API
      summary: Refresh the Access Token
      description: >-
        Use this endpoint to renew an expired access token with a valid refresh
        token.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenInput'
            example:
              refreshToken: >-
                eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ
              scope: openid profile email
      responses:
        '200':
          description: >-
            Indicates that the resource was successfully created and the
            operation was completed as expected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2Token'
              example:
                accessToken: >-
                  eyJhbGciOiJSUzI1NiIsImtpZCI6ImNlcnQtYnVpbHQtaW4iLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiYWM1NmM4MWQ0ZDZkOTVjMGFjMTIiXSwiZGlzcGxheU5hbWUiOiJBZG1pbiIsImV4cCI6MTc0MjgzMDI1MSwiaWF0IjoxNzQyODI2NjUxLCJpc3MiOiJodHRwOi8vcGx1Z2luLWF1dGgtY2FzZG9vcjo4MDgwIiwianRpIjoiYWRtaW4vODdiNzFhZDAtYmQ1My00ZTQyLWEzOWUtMTQyZmI1NWY3ZTFmIiwibmFtZSI6ImFkbWluIiwibmJmIjoxNzQyODI2NjUxLCJub25jZSI6IiIsIm93bmVyIjoibGVyaWFuIiwic2NvcGUiOiJvcGVuaW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WF1dGgtY2FzZG9vcjo4MDgwIiwianRpIjoiYWRtaW4vODdiNzFhZDAtYmQ1My00ZTQyLWEzOWUtMTQyZmI1NWY3ZTFmIiwibmFtZSI6ImFkbWluIiwibmJmIjoxNzQyODI2NjUxLCJub25jZSI6IiIsIm93bmVyIjoibGVyaWFuIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCIsInN1YiI6ImE1Y2ViMjg2LWVhODMtNDY5NS1iYjEyLTBjYzM3NzMxNmFkMSIsInRhZyI6IiIsInRva2VuVHlwZSI6ImFjY2Vzcy10b2tlbiIsInR5cGUiOiJub3JtYWwtdXNlciJ9.gh0LDXgK1mjOxMg06Z1fo5PdKAwE8fmmUyK61BcjvewoCzNg5zoxyav-7Ow4p-4HA5okJBQ8azrs2pjXvOM6_ERFDieNXxuPa02lS-z67qWctwVplbEX0L2UjMR1zsI3cRDE9djMttQcsPjhjNFf7IfVOrHsTbrhKuOxcL_SELjkuohR6gxi9w2tjsdBpwsNqa7V_SY7GBAkIBS5GuWuIzhUbrPDQtTZSeCiQ_jUCEmDJcS9dBq6y36JD8Xua0vtkb4LcdGm5XGKbRTs0mRtEIXL_HmJmMyZ9JYvNlLZgQLCD1ZFTUY0QdQV7zxP81w9aEv0zLWSYxkJQcfY29BnIsFt4lDJeay8otK8bTjvQTD613t1mVgxkKqoHc5DcJGOdppZwp2-ozRQLJutdpoPgNFdbD-VXfVrEOn8r_W1EknPvAlxVNSkt3Dw1BS8tXG36jaBihRotdXs9Vcds58h_VFAcuV91CfLyBgvze2LSNBQjaRvD_F4NV77g7VukVDJZvEwse0hd2ErMfEDs6msGP7paiW0OJI16eJA-Qw3n1vsEwI3sCAyxW4EkdVONlSenG2gVjBY7Q_ta3k3mGoqc9zKv4-oLCUdTbVlmAqYmUsagH7tUF-ntLOdbggqP7TSwMKy4D-v9sYvgDVzVyw0huwwKJb-1E5GQ7v4EaxwL1s
                tokenType: Bearer
                expiresIn: 3600
                refreshToken: >-
                  eyJ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HJET-45vRgU9161deqZF42x-dHb4I6QBKsgN1pDzvhDuTAqWKbdPthgolMlOC_Z82t_ldCikZLBTJP6OpObLroC5B8nOUgbgcKFV7RfrEZvchnuOI6PuvvrwuUkqmgz-xz9rFi2Ye6rfAvk_dxZLpbOfZQmiwLYoRXsl4ue_SOTXv2LxH0QnBlCl0
                scope: openid profile email
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0001:
                  $ref: '#/components/examples/Error0001'
                Error0003:
                  $ref: '#/components/examples/Error0003'
                Error0009:
                  $ref: '#/components/examples/Error0009'
                Error1005:
                  $ref: '#/components/examples/Error1005'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0007:
                  $ref: '#/components/examples/Error0007'
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0005:
                  $ref: '#/components/examples/Error0005'
          headers: {}
      security: []
components:
  schemas:
    RefreshTokenInput:
      description: Information used to exchange a refresh token for an access token.
      type: object
      required:
        - refreshToken
        - scope
      properties:
        refreshToken:
          description: The refresh token that you want to exchange.
          type: string
          examples:
            - >-
              eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ
        scope:
          description: The access level for the new token.
          type: string
          examples:
            - openid profile email
    OAuth2Token:
      description: >-
        Information used to manage OAuth2 authentication data. It securely
        stores access credentials, ensuring seamless authorization and control
        over protected resources.
      type: object
      required:
        - accessToken
        - tokenType
        - expiresIn
        - refreshToken
      properties:
        accessToken:
          type: string
          description: A temporary token that grants the user secure access the APIs.
        expiresIn:
          type: integer
          description: The time (in seconds) until the token expires.
        idToken:
          type: string
          description: >-
            The identity details about the authenticated user in OpenID Connect
            standards. It can be used to verify user authentication.
        refreshToken:
          type: string
          description: >-
            A long-lived token that allows users to obtain a new `access_token`
            without requiring them to log in again.
        scope:
          type: string
          description: The level of access granted to the issued tokens
        tokenType:
          type: string
          description: The type of token issued.
    ErrorMessage:
      description: The response message error.
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    Error0001:
      summary: Missing Fields in Request
      value:
        code: AUT-0001
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    Error0003:
      summary: Unexpected Fields in the Request
      value:
        code: AUT-0003
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields as per the documentation. The unexpected fields are
          listed in the fields object.
    Error0009:
      summary: Bad Request
      value:
        code: AUT-0009
        title: Bad Request
        message: >-
          The server could not understand the request due to malformed syntax.
          Please check the listed fields and try again.
    Error1005:
      summary: Invalid Refresh Token
      value:
        code: AUT-1005
        title: Invalid Refresh Token
        message: >-
          The provided 'refreshToken' is invalid, expired or revoked. Please
          verify the token and try again.
    Error0007:
      summary: Invalid Token
      value:
        code: AUT-0007
        title: Invalid Token
        message: >-
          The provided token is expired, invalid or malformed. Please provide a
          valid token and try again.
    Error0005:
      summary: Internal Server Error
      value:
        code: AUT-0005
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.

````