cppclientconnect API: Request Token not working as expected

srirevolver
Hello, I am using CppClientConnect API to connect with my registered client id. I read the documentation and watched the webinar and as they say, I entered the login and got the request token. But after entering the request token, I am getting the error as below:

./example1
login URL: https://kite.zerodha.com/connect/login?v=3&api_key=xxxxxxxxxxxx /// commented out the key
login with this URL and obtain the request token
enter obtained request token: vFTvYjoZqoAcb1zSCh33ul2Rf0Jb0WJo // changed a few characters from the original key, just to show the length of the key obtained
request failed (SSLServerVerification)

1. I tried multiple times with same result
2. I read all the available documentation and only after that I am posting this. (I took the token part from the redirect URL as suggested)

Please do have a look and suggest how I can get this working?

**************
I used the example1.cpp given with the CppClientConnect API. The code that is run is as below:

#include "kitepp.hpp"
#include
#include

namespace kc = kiteconnect;

int main() {
try {
kc::kite Kite(std::getenv("KITE_API_KEY"));
std::string apiSecret = std::getenv("KITE_API_SECRET");

std::cout << "login URL: " << Kite.loginURL() << '\n';
std::cout << "login with this URL and obtain the request token\n";

std::string reqToken;
std::cout << "enter obtained request token: ";
std::cin >> reqToken;

std::string accessToken =
Kite.generateSession(reqToken, apiSecret).tokens.accessToken;
Kite.setAccessToken(accessToken);
std::cout << "access token is " << Kite.getAccessToken() << '\n';

  • srirevolver
    @salim_chisty, Replying your suggestion in another thread https://kite.trade/forum/discussion/comment/51730#Comment_51730,

    I did go through all documentation available and also went through the webinar you suggested. Only then I posted this question above.

    I generated new access token and entered within 1 minute. Still the error comes up as

    "request failed (SSLServerVerification)"

    It seems to be something linked to my account configuration. Please are you able to check? I am stuck at the moment.

    PS: By the way since it is my first ticket on the forum, by mistake a duplicate thread is created. Please when you get time delete that duplicate thread.
  • srirevolver
    I also tried with python scripts available (above is C++), with same result. I believe it is some configuration issue with my account.
Sign In or Register to comment.