refreshApi - n1lby73/industrial-IOT GitHub Wiki
The Refresh Token API endpoint allows users to refresh their access token by providing a valid refresh token. This action generates a new access token, granting continued access to protected resources.
-
URL:
https://industrialiot.onrender.com/api/refresh -
Method:
POST
This endpoint requires a valid refresh token with appropriate JWT configurations.
-
Headers:
-
Authorization:
Bearer <REFRESH_TOKEN>
-
Authorization:
- Body Parameters: None
-
Success Response:
- Status Code: 200 OK
-
Response Body:
{ "access_token": "<NEW_ACCESS_TOKEN>" }- Description: Successful token refresh response containing a new access token.
-
Error Responses:
-
Status Code: 401 Unauthorized
-
Response Body:
{ "error": "Missing Authorization Header" } - Description: Indicates the absence of the Authorization header.
-
Response Body:
-
Status Code: 401 Unauthorized
-
Response Body:
{ "message": "invalid token", "error": "<ERROR_DETAILS>" } - Description: Indicates an invalid refresh token.
-
Response Body:
-
-
Request Method:
POST -
Endpoint URL:
https://industrialiot.onrender.com/api/refreshjwt -
Header: Include the Authorization header with the refresh token in the format:
Bearer <REFRESH_TOKEN>