Skip to content

Refresh Token

Refresh the authentication token.

Endpoint

INFO

POST /api/v1/dashboard/refresh

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Example Request

bash
curl -X POST https://api.daakey.com/api/v1/dashboard/refresh \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Token refreshed",
  "data": {
    "token": "2|newtoken123...",
    "expires_at": "2024-01-16T00:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (401)

json
{
  "success": false,
  "message": "Token has expired",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • The old token is invalidated after refresh
  • Refresh should be called before the token expires

Daakey Car Sharing Platform