Unable to access the API code

Mary_kalayarasi
{"status":"error","message":"Invalid `api_key`.","data":null,"error_type":"InputException"}

I have verified it multiple times, could see that I have entered valid key and security. Not sure the code breaks with an above error.

~\AppData\Local\Temp\ipykernel_32140\1276236506.py in access_Tocken(api_key, api_secret)
53 url = kite.login_url()
54 driver.get(url)
---> 55 driver.find_element(By.ID,"userid").send_keys("User-ID")
56 driver.find_element(By.ID,"password").send_keys("Pwd")
57 driver.find_element(By.TAG_NAME,"button").click()
  • Mary_kalayarasi
    ~\anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response)
    243 alert_text = value["alert"].get("text")
    244 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here
    --> 245 raise exception_class(message, screen, stacktrace)

    NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="userid"]"}
    (Session info: chrome=127.0.6533.73)
    Stacktrace:
    GetHandleVerifier [0x00007FF73B6F9632+30946]
    (No symbol) [0x00007FF73B6AE3C9]
    (No symbol) [0x00007FF73B5A6FDA]
    (No symbol) [0x00007FF73B5F822C]
    (No symbol) [0x00007FF73B5F850C]
    (No symbol) [0x00007FF73B63DCB7]
    (No symbol) [0x00007FF73B61CAAF]
    (No symbol) [0x00007FF73B63B041]
    (No symbol) [0x00007FF73B61C813]
    (No symbol) [0x00007FF73B5EA6E5]
    (No symbol) [0x00007FF73B5EB021]
    GetHandleVerifier [0x00007FF73B82F83D+1301229]
    GetHandleVerifier [0x00007FF73B83BDB7+1351783]
    GetHandleVerifier [0x00007FF73B832A03+1313971]
    GetHandleVerifier [0x00007FF73B72DD06+245686]
    (No symbol) [0x00007FF73B6B758F]
    (No symbol) [0x00007FF73B6B3804]
    (No symbol) [0x00007FF73B6B3992]
    (No symbol) [0x00007FF73B6AA3EF]
    BaseThreadInitThunk [0x00007FF9924C7374+20]
    RtlUserThreadStart [0x00007FF992D3CC91+33]
  • sujith
    It is mandatory by the regulators that a user has to login manually at least once a day. We don't recommend automating login.
Sign In or Register to comment.