desk logo Java SDK

SDK Errors and Solutions


Forget to set property file path in System property
initialize exception

Reason

The Java SDK has not initialized in the application.

Solution

Include desk.sdk.config in system property and call the ZohoOAuthClient.getInstance(); method in the source code.

Invalid Code
invalidCode

Reason

The grant token has expired.

Solution

Exception while fetching access tokens from grant token. Regenerate the grant token and use it to generate a new access token within the stipulated validity time.

Error occur while getting User Info
json exception

Reason

The aaaserver.profile.READ scope was not included while generating the grant token.

Solution

Invalid OAuth scope. The user must not have specified the aaaserver.profile.READ scope while generating the grant token. Include aaaserver.profile.READ scope and generate a new grant token.

NullPointerException occur while Initialization or Authorization

Reason

The mandatory configuration keys like client_id, persistence_handler_class, redirectURL, etc., must have been left empty.

Solution

Provide the mandatory configuration keys in the property file.