Skip to main content

get_token

Function get_token 

Source
pub fn get_token() -> Option<String>
Expand description

Retrieves the API token, checking sources in order:

  1. System keychain (preferred for interactive use)
  2. File at path specified by SOCORRO_API_TOKEN_PATH (for CI/headless environments)

Returns None if no token is found (does not print anything).