JSONObject["product"] not found

shilpab
shilpab edited May 2018 in Java client
Hi,
Getting exception "Exception in thread "main" org.json.JSONException: JSONObject["product"] not found." while getting access token.

kcon.requestAccessToken(request_token, api_secret)

The code block looks like this

val api_key = "************"
val user_id = "*******"
val api_secret = "**************"
val kcon = new KiteConnect(api_key)
kcon.setUserId(user_id)
val url = kcon.getLoginUrl
println("Url for request token ==> "+url)

// manually loging into kite from browser and getting the below request_token
val request_token = "*****************"

val userModel = kcon.requestAccessToken(request_token, api_secret)

Dependency used : "com.rainmatter.kiteconnect" % "kiteconnect" % "1.4.5"

Note: The same code was working perfectly fine some days back.
  • shilpab
    is this working for anyone here? I mean are you able to get access token? Thanks
  • shilpab
    Ya, finally found the issue while reading through the other posts. I need to migrate to the v 3.0. Its working fine now. @zerodha, waiting for the maven version of v3.0. And we can close this thread. Thanks
  • sujith
    You can include com.zerodhatech.kiteconnect version 3.0.0
This discussion has been closed.