> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

## v2.0.8

Added OAuth2 client-credentials support. Set `client_id`/`client_secret` on `ClientConfig` instead of `api_key` and the SDK handles the token exchange and refresh automatically:

```rust
let config = ClientConfig {
    client_id: Some(CLIENT_ID.to_string()),
    client_secret: Some(CLIENT_SECRET.to_string()),
    base_url: Environment::Sandbox.url().to_string(),
    ..Default::default()
};

let client = ApiClient::new(config).expect("Failed to build client");
```

The existing `api_key` field still works unchanged — no action needed if you're not switching auth methods. See the [Rust SDK guide](/developers/platform-sdk-rust-guide) and [Authentication](/developers/authentication) to compare both methods.