Could not get access token

madan
Calling kiteconnect.requestAccessToken("requestToken", "apiSecretKey"); result in below error

com.mashape.unirest.http.exceptions.UnirestException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

Please guide in resolving the issue.
Tagged:
  • sujith
    Hi @madan,
    This might be happening because your system might not have our certificate issuer as trusted source.
    Use this NaiveSSLContext.
  • sujith
    You will have to clone KiteConnect and modify Kite Ticker file.
  • madan
    madan edited July 2017
    Hi @sujith

    Cloned KiteConnect. what to modify in Kite Ticker file ?
    And also whatever the api keys I am using to connect are of 'publisher' app. Do I need to create 'Connect' app first (which is paid)? Is there any way that I could give some trials first and then go for payment.

    Thank you
  • sujith
    sujith edited July 2017
    Hi @madan,
    We don't have sandbox yet. We will add it in future. You will have to create a Kite Connect app to use this feature.
    Create an instance of SSLContext with NaiveSSLContext and set it to WebSocket factory.
  • madan
    Thanks a lot @sujith for faster response.
This discussion has been closed.