Skip to main content

authenticated

Function authenticated 

Source
pub fn authenticated(token: impl Into<String>) -> Configuration
Expand description

Builds a Configuration authenticated with a Timeweb Cloud JWT token.

The token is issued in the Timeweb Cloud control panel under the “API и Terraform” section. It is sent as a Bearer Authorization header on every request made with the returned configuration.

Pass the configuration to any function in crate::apis:

use timeweb_rs::apis::account_api;

let config = timeweb_rs::authenticated("your-jwt-token");
let status = account_api::get_account_status(&config).await?;
println!("{status:#?}");