Extract the refresh token from the Auth response using Java SDK

Hi.

Almost 3 months ago, refresh tokens have been introduced in Genesys Cloud to request a new access token after the old one expires. As a matter of fact, the OAuth response is now structured as following (in bold the JSON entry introduced by such update):

{
"access_token":"token1",
"token_type":"bearer",
"expires_in":86399,
"refresh_token":"token2"
}

Since I use a code authorization client in an application, I tried to extract the refresh token using your latest available SDK (i.e., 93.0.0). In my attempts, I discovered that your com.mypurecloud.sdk.v2.extensions.AuthResponse object does not have a property that maps the refresh_token field, and actually the information is lost. For the time being, I developed a workaround in which the refresh token is extracted from the bare JSON response.

Will you include the refresh token support in future versions of the SDK?

Thanks in advance.

Luigi

Luigi,

We're planning on adding refresh tokens to the SDKs in an upcoming release. Keep an eye on the releases for the addition.

Ronan

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.