Authentication
Refresh token
Issue a new session token if the current one is still valid
POST
/
connect
/
refresh
curl -X POST https://api.useknot.xyz/connect/refresh \
-H "Authorization: Bearer <token>"
{
"status": true,
"data": {
"sessionToken": "eyJhbGciOiJIUzI1NiIs...",
"solanaAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"email": "agent@example.com"
}
}
Use this endpoint to obtain a fresh JWT token without re-authenticating via OTP. The current token must still be valid. Call this before your token expires to avoid service interruptions.
Requires authentication via Bearer token.
Implement proactive token refresh in your agent before the expiration timestamp returned by validate token. Handle
401 errors by re-authenticating via the full OTP flow.Response
boolean
true when the refresh succeeds.object
Errors
| Status | Description |
|---|---|
401 | Token is missing, invalid, or already expired |
429 | Rate limit exceeded |
curl -X POST https://api.useknot.xyz/connect/refresh \
-H "Authorization: Bearer <token>"
{
"status": true,
"data": {
"sessionToken": "eyJhbGciOiJIUzI1NiIs...",
"solanaAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"email": "agent@example.com"
}
}
curl -X POST https://api.useknot.xyz/connect/refresh \
-H "Authorization: Bearer <token>"
{
"status": true,
"data": {
"sessionToken": "eyJhbGciOiJIUzI1NiIs...",
"solanaAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"email": "agent@example.com"
}
}