error in ltp api call

vipin0761
i am running below code in python

def get_ticker_quote(user):
import requests
url = "https://api.kite.trade/quote?i=MCX:NATURALGAS22MAY750CE" + "X-Kite-Version: 3" + "Authorization: token " +str(user.get_api_key()) + ':' + str(user.get_access_token())
response = requests.get(url)
print(response.text)

getting the below error. the api_key and access_token are corect

{"status":"error","message":"Invalid `api_key` or `access_token`.","data":null,"error_type":"InputException"}
Sign In or Register to comment.