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

# Refresh Token

> Refreshes a user's login session using a valid JSON Web Token (JWT).

Over time, a JWT may expire, which means that the user will need to log in again to obtain a new JWT. However, the "/refresh" method provides a way for the user to refresh their existing login session without having to log in again.


## OpenAPI

````yaml post /refresh
openapi: 3.0.1
info:
  title: TrustOS EVM ID API
  description: >-
    TrustOS EVM ID API is used to interact with EVM based blockchain networks.
    In case you have some questions or need more about the use of this API,
    don't hesitate to contact B-Team:
  contact:
    name: Blockchain Team
    email: soporte-bteam@telefonica.com
  version: 2.3.3
servers:
  - url: https://lab.trustos.telefonicatech.com/id/v2
    description: Lab
security: []
tags:
  - name: Authentication
    description: Users authentication via a JSON Web Token (JWT).
  - name: Identity
    description: User identity management.
paths:
  /refresh:
    post:
      tags:
        - Authentication
      summary: Refresh token.
      responses:
        '200':
          $ref: '#/components/responses/200-SuccessfulRefresh'
        '401':
          $ref: '#/components/responses/401-AuthenticationError'
        '500':
          $ref: '#/components/responses/500-InternalServerError'
        '503':
          $ref: '#/components/responses/503-ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  responses:
    200-SuccessfulRefresh:
      description: Successful token refresh.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 200
              message:
                type: string
                description: Message returned by the request.
                example: Sucessful refresh
              data:
                type: object
                description: Data returned by the request.
                properties:
                  token:
                    type: string
                    description: >-
                      The JWT authentication token that can be used to
                      authenticate and authorize future requests.
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e
    401-AuthenticationError:
      description: Authentication Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 401
              type:
                type: string
                description: Error type.
                example: Authentication Error
              message:
                type: string
                description: Message returned by the request.
                example: Token is not provided
    500-InternalServerError:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 500
              type:
                type: string
                description: Error type.
                example: Internal Server Error
              message:
                type: string
                description: Message returned by the request.
                example: Oops! Something went wrong, please try again later
    503-ServiceUnavailable:
      description: Service unavailable error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 503
              type:
                type: string
                description: Error type.
                example: Service Unavailable Error
              message:
                type: string
                description: Message returned by the request.
                example: Service temporarily unavailable, please try again later
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````