i think these people are making money nothing else will happen properly... we should raise voice and get our refund... also should complaint against them
@k365 RTFM or use one of the official clients to use the APIs. Most of the issues posted here are because people doesn't have much expertise to integrate the APIs. We have many people who have integrated easily by just reading our docs properly.
i have followed all the standards given, even then it is not working. here is my code.
<?php include dirname(__FILE__)."/kiteconnect.php"; $api_key = "ial1sco22dpi9awi"; $api_secret = "My_sec Key";
// Incoming request token from the redirect. // $request_token = @$_GET["request_token"]; // Initialise. $kite = new KiteConnect($api_key);
// Assuming you have obtained the `request_token` // after the auth flow redirect by redirecting the // user to $kite->login_url() try { $request_token=@$_GET['request_token'] ; $user = $kite->requestAccessToken($request_token, $api_secret);
@DV3508 The request token comes to the redirect url after a successful login. I checked your app and your redirect url is just the url to your website, not the PHP script you have posted above. Obviously, without the request token coming as a query param, it won't work. Please read the manual and understand how the login and authentication flow works.
@k365 Your app's redirect URL is set to '127.0.0.1'. How do you expect to get the request token after the login without even setting a proper redirect url? Please do not make inflammatory comments and throw accusations at us if you do not have the technical knowledge to implement the APIs. There's a reason why you have to check and agree to the "I have read the API Documentation and have the technical know-how to use it" option while you sign up.
The redirect end point is the exact script you've pasted above and it works fine. Once the login's done, it redirects to the script and you can see a successful response.
we should raise voice and get our refund... also should complaint against them
i have followed all the standards given, even then it is not working. here is my code.
<?php
include dirname(__FILE__)."/kiteconnect.php";
$api_key = "ial1sco22dpi9awi";
$api_secret = "My_sec Key";
// Incoming request token from the redirect.
// $request_token = @$_GET["request_token"];
// Initialise.
$kite = new KiteConnect($api_key);
// Assuming you have obtained the `request_token`
// after the auth flow redirect by redirecting the
// user to $kite->login_url()
try {
$request_token=@$_GET['request_token'] ;
$user = $kite->requestAccessToken($request_token, $api_secret);
echo "Authentication successful. \n";
print_r($user);
$kite->setAccessToken($user->access_token);
} catch(Exception $e) {
echo "Authentication failed: ".$e->getMessage();
throw $e;
}
echo $user->user_id." has logged in";
// Get the list of positions.
echo "Positions: \n";
print_r($kite->positions());
// Place order.
$order_id = $kite->orderPlace([
"tradingsymbol" => "INFY",
"exchange" => "NSE",
"quantity" => 1,
"transaction_type" => "BUY",
"order_type" => "MARKET",
"product" => "NRML"
], "regular");
echo "Order id is ".$order_id;
?>
Can any one help me please.
The redirect end point is the exact script you've pasted above and it works fine. Once the login's done, it redirects to the script and you can see a successful response.