Unable to get access token

raju.bn
Hi Kailash,
I have followed steps in api document but still not able to get access token.
Please check the below error. I have supplied the correct api_key and api_secret.

Traceback (most recent call last):
File "", line 1, in
access_token = kite.request_access_token(request_token, api_secret)
File "kiteconnect\__init__.py", line 208, in request_access_token
"checksum": checksum
File "kiteconnect\__init__.py", line 376, in _post
return self._request(route, "POST", params)
File "kiteconnect\__init__.py", line 459, in _request
raise(exp(data["message"], code=r.status_code))
TokenException: Invalid session credentials
  • raju.bn
    Above exception raised in windows os
  • Kailash
    This will happen if
    a) Your request_token is wrong
    b) Your api_key is wrong
    c) Your api_secret is wrong

    Are you sure you passed the correct request_token? Please debug and confirm.
  • raju.bn
    raju.bn edited March 2016
    Thanks for your time Kailash, Yes, this is because of wrong request_token. I could fix it.
  • raju.bn
    raju.bn edited March 2016
    Hi Kailash,
    I am facing new issue now. After supplying correct apikey and request token still its raising new error.
    Please check the below Error...
    Traceback (most recent call last):
    File "", line 1, in
    user = kite.request_access_token(request_token, api_secret)
    File "kiteconnect\__init__.py", line 208, in request_access_token
    "checksum": checksum
    File "kiteconnect\__init__.py", line 376, in _post
    return self._request(route, "POST", params)
    File "kiteconnect\__init__.py", line 453, in _request
    exp = getattr(ex, data["error_type"])
    AttributeError: 'module' object has no attribute 'PermissionException'
  • Kailash
    @raju.bn Please try one again. I think there was some maintenance happening over the weekend.
This discussion has been closed.