---
updatedAt: 2026-08-28T15:01:18.000Z
agentTools:
  projectIndex: https://developer.getbright.se/llms.txt
---

# Oauth refresh token

Use this endpoint to refresh an `access_token` using the `refresh_token` you got during authorization.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Bright Kit",
    "version": "v1.0",
    "contact": {
      "name": "Bright Energy",
      "url": "https://www.getbright.se",
      "email": "support@getbright.se"
    },
    "description": "<br>\n<img src=\"https://bright-documentation-assets.s3.eu-north-1.amazonaws.com/bright-kit-logo.svg\" width=\"300\">\n\nThe following API specification is a blueprint for Bright Energy partners.\n\nPartners are required to create and expose these endpoints only to Bright Energy for fetching user data. This enables users to access your applications and all embedded features.\n",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "summary": "Bright Kit"
  },
  "servers": [
    {
      "url": "https://{kitEnvironment}.{kitDomain}/{kitBasePath}",
      "description": "Variable based url structure.\n\n`kitDomain`: The domain the Bright Kit is deployed to.\n\n`kitEnvironment`: The environment to target your requests. `staging` shall be used for integration and testing purposes.\n\n`kitBasePath`: Use v1 currently.\n",
      "variables": {
        "kitDomain": {
          "default": "domain"
        },
        "kitEnvironment": {
          "default": "staging"
        },
        "kitBasePath": {
          "default": "v1"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "oauth",
      "description": "<img src=\"https://bright-documentation-assets.s3.eu-north-1.amazonaws.com/oauth_logo.svg\" width=\"300\">\n\nOAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.\n\nLearn more about the different specifications at: <https://oauth.net/specs/>\n"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "bearerAuth": []
    }
  ],
  "externalDocs": {
    "description": "Bright Energy Developer Hub",
    "url": "https://developer.getbright.se"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Can be the obtained token from an approved authorization method (Oauth or OpenId) or a pre-generated token given to Bright Energy. Tokens must be environment specific. JWT supported."
      },
      "apiKey": {
        "type": "apiKey",
        "name": "apiKey",
        "in": "header",
        "description": "API key that is environment specific."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "BadRequestError",
              "message": "The request was malformed.",
              "status": 400,
              "error": true,
              "key": "BadRequestError",
              "uid": "y9g1f21f-a740-4346-9a79-3800fe8c8644"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "ForbiddenError",
              "message": "Invalid Token.",
              "status": 401,
              "error": true,
              "key": "TOKEN_INVALID",
              "uid": "a9c1f21f-a740-4346-9a79-3800fe8c8652"
            }
          }
        }
      }
    },
    "requestBodies": {
      "OauthRefreshToken": {
        "description": "The standard request body for a GET /refresh_token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/OauthRefreshToken"
            }
          },
          "application/x-www-form-urlencoded": {
            "schema": {
              "$ref": "#/components/schemas/OauthRefreshToken"
            }
          }
        }
      }
    },
    "schemas": {
      "ISO8601": {
        "type": "string",
        "minLength": 19,
        "format": "date-time",
        "pattern": "^(-?(?:[1-9][0-9]*)?[0-9]{4})(-(1[0-2]|0[1-9]))?(-(3[01]|0[1-9]|[12][0-9]))?(T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])((.[0-9]+)?|([+-](2[0-3]|[01][0-9]):([0-5][0-9]))))?(Z)?$",
        "title": "ISO8601",
        "description": "A field which should comply with the ISO 8601 standard.",
        "examples": [
          "2023-10-20T15:30:30+02:00",
          "2023-10-20T11:30:30.000Z"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "GenericError"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "An error of some origin has occurred."
            ]
          },
          "status": {
            "type": "number",
            "format": "int32",
            "minimum": 400,
            "maximum": 600,
            "examples": [
              400
            ]
          },
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "GenericError"
            ]
          },
          "uid": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "25198069-6171-410c-bfed-5e0666402c08"
            ]
          }
        },
        "required": [],
        "title": "Error",
        "description": "The standard error object used in API responses",
        "minProperties": 6
      },
      "AuthToken": {
        "type": "object",
        "properties": {
          "token_type": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "Bearer"
            ]
          },
          "access_token": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "thisIsAnAccessTokenString"
            ]
          },
          "refresh_token": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "thisIsARefreshTokenString"
            ]
          },
          "expiresAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601"
              },
              {
                "description": "The date-time expiration date for the authToken."
              }
            ]
          },
          "expires_in": {
            "type": "number",
            "format": "int32",
            "examples": [
              3600
            ]
          }
        },
        "required": [
          "access_token",
          "expires_in"
        ],
        "title": "AuthToken",
        "description": "Authorization token response."
      },
      "OauthRefreshToken": {
        "type": "object",
        "properties": {
          "grant_type": {
            "type": "string",
            "minLength": 0,
            "description": "Denotes the flow you are using. To refresh a token, use `refresh_token`."
          },
          "client_id": {
            "type": "string",
            "minLength": 1,
            "description": "The client_id given to Bright Energy."
          },
          "client_secret": {
            "type": "string",
            "minLength": 1,
            "description": "The client_secret given to Bright Energy."
          },
          "refresh_token": {
            "type": "string",
            "minLength": 0,
            "description": "The refresh_token from the POST /authorize endpoint."
          },
          "scope": {
            "type": "string",
            "minLength": 0,
            "description": "A space-delimited list of requested scope permissions. If not sent, the original scopes will be used; otherwise you can request a reduced set of scopes. Note that this must be URL encoded."
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "refresh_token"
        ],
        "description": "The generic request body for an Oauth /refresh_token request."
      }
    }
  },
  "paths": {
    "/auth/refresh_token": {
      "get": {
        "operationId": "get-auth-referesh-token",
        "summary": "Oauth refresh token",
        "description": "Use this endpoint to refresh an `access_token` using the `refresh_token` you got during authorization.",
        "tags": [
          "oauth"
        ],
        "security": [],
        "requestBody": {
          "$ref": "#/components/requestBodies/OauthRefreshToken"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthToken"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  }
}
```