tonhowtf/omniget · error · anyhow::Error

Falha ao obter guest token: HTTP

Error message

Falha ao obter guest token: HTTP {}

What it means

The anonymous guest-token request to Twitter's token endpoint (posted with the public bearer token) returned a non-success HTTP status; the {} is the raw code. Without a guest token no GraphQL request can be made — usually rate limiting of the IP or Twitter refusing anonymous activation.

Solutions

  1. Wait several minutes and retry — guest token endpoints are heavily rate limited
  2. Switch network/IP if the current one is throttled
  3. Update the app if Twitter changed the token endpoint contract
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src-tauri/src/platforms/twitter/mod.rs:293 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/eb2ba8526921cbe5. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/platforms/twitter/mod.rs:293

        if !force {
            let cached = self.guest_token.lock().await;
            if let Some(ref token) = *cached {
                return Ok(token.clone());
            }
        }

        let response = self
            .client
            .post(TOKEN_URL)
            .header("Authorization", BEARER)
            .header("x-twitter-client-language", "en")
            .header("x-twitter-active-user", "yes")
            .header("Accept-Language", "en")
            .send()
            .await?;

        if !response.status().is_success() {
            return Err(anyhow!(
                "Falha ao obter guest token: HTTP {}",
                response.status()
            ));
        }

        let json: serde_json::Value = response.json().await?;
        let token = json
            .get("guest_token")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow!("Guest token ausente na resposta"))?
            .to_string();

        let mut cached = self.guest_token.lock().await;
        *cached = Some(token.clone());
        Ok(token)
    }

    async fn request_tweet(

View on GitHub (pinned to 8600b91f42)