An unofficial Rust client library for the Plaid API.
-
Add the following to your
Cargo.toml
:[dependencies] plaid = { git = "https://github.com/telcoin/plaid.git", tag = "v0.9.1" } tokio = { version = "1", features = ["full"] }
-
Obtain your API credentials from: https://dashboard.plaid.com/team/keys
-
Get started with this example
main.rs
:#[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { // or use `plaid::Client::from_env()?` let client = plaid::Client::new( "your_client_id", "your_client_secret", plaid::Environment::Sandbox, ); // TODO: use the Link flow instead; https://plaid.com/docs/link/#link-flow let public_token = client.sandbox_create_public_token().await?.public_token; let access_token = client .exchange_public_token(&public_token) .await? .access_token; let _accounts = client.accounts(&access_token).await?.accounts; Ok(()) }