OAUTH_SCOPE_MISMATCH, invalid oauth scope to access this URL

OAUTH_SCOPE_MISMATCH, invalid oauth scope to access this URL

I have read similar topics, but still didn't succeed.

- A java client using com.zoho.crm, zohocrmsdk-2-1, 2.0.0 dependency
- A self client is used with scope of "ZohoCRM.modules.ALL"
- Grant token from

var token = new OAuthToken.Builder()
.clientID(clientId from self client)
.clientSecret(client secret from the self client)
.grantToken(the generated code) .build();

The below code is to get the modules (from the sample code):

var moduleOperations = new ModulesOperations();
var headerInstance = new HeaderMap();
var ifmodifiedsince = OffsetDateTime.of(2020, 05, 20, 10, 00, 00, 01, ZoneOffset.of("+05:30"));
headerInstance.add(ModulesOperations.GetModulesHeader.IF_MODIFIED_SINCE, ifmodifiedsince);

var response = moduleOperations.getModules(headerInstance);


Thanks.