Library to help interact with v2 of the Zoho CRM API.
You can either create a client with a preset access token, or fetch a new one later on. This can be useful if you are keeping track of you access tokens in a database, for example. You will need an API client ID, secret, and refresh token.
You can read more information here: https://www.zoho.com/crm/developer/docs/api/oauth-overview.html
To handle parsing response records, you will also need deserializable objects with serde
:
toml
[dependencies]
serde = { version = "1.0", features = ["derive"] }
```rust use serde::Deserialize; use zoho_crm::ZohoClient;
let clientid = String::from("YOURCLIENTID"); let clientsecret = String::from("YOURCLIENTSECRET"); let refreshtoken = String::from("YOURREFRESH_TOKEN");
let mut client = ZohoClient::withcreds( None, // access token None, // api domain clientid, clientsecret, refreshtoken );
struct Account { id: String, name: String, }
let account = client.get::