API v2 C# SDK Null Reference Exception
Hi,
I'm try to connect to Zoho API using C# Sdk. I was following the steps in official documentation and I'm getting Null Reference Exception.
Here is a sample code:
- var config = new Dictionary<string, string>
- {
- {"client_id", "..."},
- {"client_secret", "..."},
- {"redirect_uri", "https://localhost"},
- {"access_type", "offline"},
- {"persistence_handler_class", "ZCRMSDK.OAuth.ClientApp.ZohoOAuthFilePersistence, ZCRMSDK"},
- {
- "oauth_tokens_file_path",
- @"c:\zoho-tokens.txt"
- },
- {"mysql_username", ""},
- {"mysql_password", ""},
- {"mysql_database", ""},
- {"mysql_server", ""},
- {"mysql_port", ""},
- {"apiBaseUrl", "https://www.zohoapis.com"},
- {"iamURL", "https://accounts.zoho.com"},
- {"photoUrl", "https://profile.zoho.com/api/v1/user/self/photo"},
- {"apiVersion", "v2"},
- {"logFilePath", @"c:\Logs\Zoho"},
- {"timeout", ""},
- {"minLogLevel", ""},
- {"domainSuffix", ""},
- {"currentUserEmail", "..."}
- };
- ZCRMRestClient.Initialize(config);
- var leadsResponse = ZCRMRestClient.GetInstance().GetModule("Leads");
Null Reference Exception
Before I got this exception i had a few exceptions saying something like: "Given user is not presented ...".
Any idea what can be wrong with it?
Thanks,
Maxat.