Skip to main content

We have created a method the does the oauth authentication but it will not persist. Can anyone give me a Java example of one? Here is what I have so far.

@Bean(name="ring-central-rest-config")

public RestClient buildRingCentralRestClientUrl() {

RestClient rc = new RestClient(ringCentralClientId, ringCentralClientSecret, ringCentralServerUrl, getOkHttpClient(this.env));

try {

rc.authorize(accountId, extension, password);

}

catch (IOException | RestException e) {

logger.info("error in calling ring central rest client" + e.getMessage());

}

return rc;

}

screen-shot-2021-11-09-at-50629-pm.pngHi Scott,

Can you share the full log of the resulting exception so we can understand the exact cause of it? Also, did you set "Issue Refresh Tokens" to "Yes" for your app in the developer portal? See attached screenshot of the same.


Yes, our app is set to Issue Refresh Tokens. I am working on the logs.


rc.authorize(accountId, extension, password);

Why accountId? Is that really your account id and where did you get the id? BTW, where did you learn that?

It must be a main company phone number (if you specify the extension number) or the user phone number or the user's email address.


Reply