When I executed GenesysAPI in a Java program, I got the following error.
What is the cause of the error?
Once the GenesysAPI is successfully executed and the return value is obtained, if the GenesysAPI is immediately executed, the following error message appears
If you execute GenesysAPI after about 30 minutes, it succeeds.
Is there an access token release process or something else that needs to be done?
■GenesysAPI Execution Procedure
1.Obtain access token by specifying clientId,clientSecret,region,userId
2.Build apiClient with access token
■Error
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:221)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at com.ibm.jsse2.ak.a(ak.java:111)
at com.ibm.jsse2.ak.g(ak.java:192)
at com.ibm.jsse2.ak.b(ak.java:52)
at com.ibm.jsse2.a0.a(a0.java:35)
at com.ibm.jsse2.bj.b(bj.java:451)
at com.ibm.jsse2.bj.f(bj.java:182)
at com.ibm.jsse2.bj.a(bj.java:508)
at com.ibm.jsse2.bj.startHandshake(bj.java:60)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at com.mypurecloud.sdk.v2.connector.apache.ApacheHttpClientConnector.invoke(ApacheHttpClientConnector.java:71)
at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:749)
at com.mypurecloud.sdk.v2.ApiClient.authorizeClientCredentials(ApiClient.java:301)
at com.genesysadapter.agent.user.UserAPI.getAccessToken(UserAPI.java:117)
at com.testapp.test.testApp.main(testApp.java:64)
■Other Information
・java version "1.8.0_331"(IBM)
・platform-client-v2-149.0.1.jar