When trying to login to zerodha using cppkiteconnect getting failed to send http/https request

devpar
Login URL: https://kite.zerodha.com/connect/login?v=3&api_key=enter_api_key_here
Login with this URL and obtain the request token.
Enter obtained request token: enter_request_token_here
Failed to send http/https request (enum code: 10)

Here I have hard coded the apiSecret key.Please let me know what mistake I am doing.
  • sujith
    You check out the login flow here.
  • devpar
    Sujith thanks I have gone through that login flow. What I think that I could not send the request itself.
  • rakeshr
    Failed to send http/https request (enum code: 10)
    Can you re-check if you have correctly included the kite cpp client folder in your project folder(from where you are making the request)?
    You can go through cpp example here.
  • devpar
    $ sudo make
    [100%] Built target example1

    $ ./example1
    Running..
    Login URL: https://kite.zerodha.com/connect/login?v=3&api_key=enter_api_key
    Login with this URL and obtain the request token.
    Enter obtained request token: enter_request_token
    Failed to send http/https request (enum code: 10)

    As you can see guys it is generation failed to send error . Which means it cannot send the request form the system.

    My working directory

    $ ls -ltr
    total 3220
    -rw-r--r-- 1 root root 988 Mar 17 17:03 CMakeLists.txt
    drwxr-xr-x 2 root root 4096 Mar 17 17:04 cpp-httplib
    drwxr-xr-x 2 root root 4096 Mar 17 17:04 fmt
    drwxr-xr-x 2 root root 4096 Mar 17 17:04 PicoSHA2
    -rw-r--r-- 1 root root 1607 Mar 17 17:04 kitepp.hpp
    drwxr-xr-x 5 root root 4096 Mar 17 17:04 rapidjson
    -rw-r--r-- 1 root root 18068 Mar 17 17:51 CMakeCache.txt
    -rw-r--r-- 1 root root 5121 Mar 17 17:51 Makefile
    -rw-r--r-- 1 root root 1656 Mar 17 17:51 cmake_install.cmake
    drwxr-xr-x 2 root root 4096 Mar 19 09:44 kitepp
    -rw-r--r-- 1 root root 2770 Mar 19 14:17 example1.cpp
    -rwxr-xr-x 1 root root 3224920 Mar 19 14:19 example1
    drwxr-xr-x 5 root root 4096 Mar 19 14:19 CMakeFiles

  • rakeshr
    @devpar
    Can you post your issue in this thread instead?
  • _bhumit
    I couldn't reproduce this on two completely different machines running different distros (Fedora, Ubuntu). That enum code represents an SSL error, particularly SSL server verification error. Make sure you are on master branch and you're linking openssl properly. Check your firewall too, it could be blocking connections, but that is unlikely. What is the openssl version you are on?
Sign In or Register to comment.