Repository navigation
Conversation
a8c6ede to
a1f5f43
Compare
3d3d866 to
f622f9f
Compare
| Clip::Key(key) => { | ||
| let verdict = auth::key_matches_sign_in(&client, &api_base, &key); | ||
| if verdict.as_ref().is_ok_and(|same| *same) { | ||
| env_file::write(&env_file, &env_file::with_key(&existing, &key))?; |
There was a problem hiding this comment.
If the write fails, then this returns an error and the key is never cleared from the clipboard. Should also return a readable error in this case.
| ) | ||
| .map_err(fail)?; | ||
| match response.status() { | ||
| s if s == 401 || s == 403 => Ok(None), |
There was a problem hiding this comment.
In the case where an API key has scoped permissions and it doesn't include user-read, this will incorrectly flag that the key is invalid. We should check the body in case of a 401 and see if it is a bad key or if it's missing permissions.
Perhaps in the case of a restricted key we should print out a warning.
| .and_then(loopback) | ||
| .unwrap_or_else(|| config.token_url.trim_end_matches("/v1/oauth/token").into()); | ||
| let token_url = format!("{oauth_base}/v1/oauth/token"); | ||
| let mut params = vec![("key_handoff", "clipboard".to_string())]; |
There was a problem hiding this comment.
Can we add either ELEVEN_VIA or an additional parameter for attribution? I'd like to track how many accounts were created via an agent.
Could also add a unique ID in this initial request that we print and include in subsequent requests via the skill so we can track whether the full onboarding > first request flow worked.
Summary
This pull request adds two new commands to the CLI:
elevenlabs onboardandelevenlabs onboard status. Both are meant to be called from the ElevenLabs skills, print JSON for them, and are intentionally hidden from CLI help output and from README documentation.