tinyhumansai/openhuman · error · anyhow::Error
consume login token response missing jwt
Error message
consume login token response missing jwt
What it means
The backend answered the login-token consume call, but its JSON payload has no non-empty 'jwt' field, so the exchange produced no usable session token and the response is treated as malformed rather than accepted.
Solutions
- Check backend logs for why the consume route returned a body without a jwt
- Verify the token was not already consumed or expired
- Retry with a fresh one-time login token
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/api/rest.rs:538 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/2149292042e4fbe9.
Report an issue: GitHub.
Appendix: source
Thrown at src/api/rest.rs:538
// (see backend `routes/auth.ts`). The legacy
// `telegram/login-tokens/{token}/consume` path-param route was removed, so
// the old call 404'd and Telegram/OAuth-token login could never complete
// (WIRING_GAPS_AUDIT C1/C2).
let response = self
.sdk
.auth()
.consume_login_token(&tinyhumans_sdk::api::types::LoginTokenRequest {
token: token.to_string(),
})
.await
.context("consume login token through TinyHumans SDK")?;
let jwt = response
.get("jwt")
.and_then(Value::as_str)
.unwrap_or_default()
.trim()
.to_string();
anyhow::ensure!(!jwt.is_empty(), "consume login token response missing jwt");
Ok(jwt)
}
/// Validates that the provided session token is still active and accepted.
pub async fn validate_session_token(&self, bearer_jwt: &str) -> Result<()> {
let _ = self.fetch_current_user(bearer_jwt).await?;
Ok(())
}
/// Creates a short-lived link token for connecting a specific communication channel.
pub async fn create_channel_link_token(
&self,
channel: &str,
bearer_jwt: &str,
) -> Result<Value> {
let channel = channel.trim().trim_matches('/');
anyhow::ensure!(!channel.is_empty(), "channel is required");
let encoded_channel = urlencoding::encode(channel);View on GitHub (pinned to 7491200858)