Incorrect api key or token

I am getting this error , even the api key and secret are correct. can you please help. have put here as if somebody faces same kind of problem so they can refer it.
Traceback (most recent call last):
File “d:\pythonpractice\simple_kitelogin.py”, line 13, in
quote_date = kite.quote(‘NSE:{}’.format(stock_to_chck_Ltp))
File “C:\Users\91974\AppData\Local\Programs\Python\Python39\lib\site-packages\kiteconnect\connect.py”, line 571, in quote
data = self._get(“market.quote”, params={“i”: ins})
File “C:\Users\91974\AppData\Local\Programs\Python\Python39\lib\site-packages\kiteconnect\connect.py”, line 836, in _get
return self._request(route, “GET”, url_args=url_args, params=params, is_json=is_json)
File “C:\Users\91974\AppData\Local\Programs\Python\Python39\lib\site-packages\kiteconnect\connect.py”, line 912, in _request
raise exp(data[“message”], code=r.status_code)
kiteconnect.exceptions.TokenException: Incorrect api_key or access_token.

Thank you for posting the full traceback.

The Kite Connect docs say that you get a TokenException under these
circumstances:

Preceded by a 403 header, this indicates the expiry or invalidation of
an authenticated session. This can be caused by the user logging out, a
natural expiry, or the user logging into another Kite instance. When you
encounter this error, you should clear the user’s session and
re-initiate a login.

https://kite.trade/docs/connect/v3/exceptions/