TokenException: Invalid checksum

primalik
primalik edited November 2016 in Python client
I started using python library and getting this error -
'TokenException: Invalid checksum' on executing this line of code -
data = kite.request_access_token(request.args['request_token'], secret=app.secret_key)

I am using the request token as it was returned back after login and using correct secret key.
Can somebody guide please ? Thanks.


>>>
File "/Users/primalik/Personal/Code/app/hello.py", line 18, in home
data = kite.request_access_token(request.args['request_token'], secret=app.secret_key)
File "/Library/Python/2.7/site-packages/kiteconnect/__init__.py", line 227, in request_access_token
"checksum": checksum
File "/Library/Python/2.7/site-packages/kiteconnect/__init__.py", line 459, in _post
return self._request(route, "POST", params)
File "/Library/Python/2.7/site-packages/kiteconnect/__init__.py", line 542, in _request
raise(exp(data["message"], code=r.status_code))
TokenException: Invalid checksum
<<<
  • suraj
    I am getting same kind of an error. Did you resolve it?
  • sujith
    sujith edited December 2016
    Either request token is wrong or API secret is wrong, recheck and retry.
  • primalik
    primalik edited December 2016
    @sujith , api secret and request token both are correct. I am still stuck on it, is there any other thing that I am missing ?
    @suraj , did you got to resolve this ?
  • primalik
    Sorry, It worked for me. I was using api key instead of api secret while calling.
    Thanks @sujith .
This discussion has been closed.