Skip to main content

directory

Function directory 

Source
pub async fn directory(parts: &Parts) -> Result<Directory, StackureError>
Expand description

List the users and teams in the caller’s Stackure organization who can open the app, for pickers and sharing.

Authenticated by the request’s session cookie, so call it from a route behind crate::auth; MCP bearer tokens are not accepted. A request without a well-formed session token gets StackureError::Auth without a Stackure call.

§Example

let directory = stackure::directory(parts).await?;
for user in &directory.users {
    println!("{}", user.user_email);
}

§Errors

Returns StackureError::Auth when there is no valid session or the app secret is wrong, or any other StackureError on invalid input or a transport or API failure.