desk logo Java SDK

Configuration

To be able to access Zoho Desk functionalities through your application, you must first authenticate the application. To do this, you must pass certain key-value configuration pairs in the property file and pass the path of the file as the value of the desk.sdk.config system property key.

The mandatory and optional configuration keys are given below. Make sure to include the mandatory keys in the property file.

                            
Copy to clipboard
minLogLevel=WARNING #Optional key. The default logging level is WARNING. client_id=1000.xxxxxxxxxxxxxxx #Mandatory key. The consumer key generated from the connected app. client_secret=xxxxxxxxxxxxxxxx #Mandatory key. The consumer secret generated from the connected app. redirect_uri={redirect_uri} #Mandatory key. The Callback URL that you registered during the app Registration. scope=#Optional key. desk API scopes separated by commas like this: Desk.tickets.READ,Desk.contacts.READ. It becomes mandatory if you try to generate access tokens from your app. dc=com #Optional key. The domain from which the API calls are made. The default value is com. eu, cn, in, and au are also supported. logFilePath=/relativepath/application.log #Optional key. If you include this property, all SDK logs are stored in the file specified. timeout={timeout value} #Optional key. proxyHost={proxyHost} #These keys are required in case you have a proxy connection. proxyPort={proxyPort} proxyUserDomain={proxyUserDomain} proxyUser={proxyUser} proxyPassword={proxyPassword}

Mandatory Keys

  • client_id, client_secret and redirect_uri: OAuth credentials generated after registering your application.

Optional Keys

  • minLogLevel: The logging level for the SDK logs.
  • logFilePath: Absolute path of the file that stores the SDK logs. If this key is not included, all logs are printed in the console.
  • dc: Domain from which the API calls are made. For US, which is the default domain, use com. For EU, use eu. For IN, use in. For AU, use au and for CN, use cn.
  • scope: To generate access tokens from the self client instead of your application, you must provide the relevant Desk API scopes along with the aaaserver.profile.read scope, separated by commas. The aaaserver.profile.read scope helps fetch application information and store access and refresh tokens against the application information. If you generate access tokens from your app, you must define the scopes in the property file because the scope property is used for constructing URLs in Zoho Accounts.
  • timeout: Period after which the connection of the API call times out.
  • proxyHost, proxyPort, proxyUserDomain, proxyUser, proxyPassword: Details of proxy server. These keys are mandatory if you use a proxy server.

Note:

  • With the help of javac -D option, you can pass the configuration property file path as the value of the desk.sdk.config system property.