Issue in migrating from KiteDotNet to KiteConnect-3

tasklive
@botany02
I am using KiteDotNet library for login and pushing the orders. Now KiteConnect-3 has been come into picture. I am finding some difficulties to migrate to KiteConnect-3.

So, could you help me to give some working sample which is in VB.NET for KiteConnect-3..?
  • tasklive
    @botany02
    I am able to generate Request Token and Access Token successfully. And also I am able to place orders successfully.

    But I am inserting Request Token manually from url to generate Access Token. Is there any way to extract Request Token value from url after login and save it in textbox in winform..?

    And also I need to know that, is there any way to get access token and save it in a textbox in winform automatically ?

    Now I request you to give an idea to read the Request Token and Access token in login flow automatically instead of inserting manually.
  • botany02
    botany02 edited March 2018
    @tasklive
    KiteDotNet is still using the old Kite Version, we are working on new version.

    You can use WebBrowser control to capture the Url and parse it to get request token.
    All you need is hook a method to 'WebBrowser.Navigated' event to capture the request token.

    Example:
    The below uses WebBrowser control with Http utility to do the above
    Private Sub WebBrowser1_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
    Try
    Dim sActiveUrl As String = WebBrowser1.Url.ToString

    If sActiveUrl.Contains("REQUEST_TOKEN") Then
    Dim RequestToken As String = HttpUtility.ParseQueryString(WebBrowser1.Url.Query).Get("request_token")
    End If
    Catch ex As Exception
    ErrorReport("WebBrowser1_Navigated", ex.Message)
    End Try
    End Sub
  • tasklive
    @botany02
    Sorry for late reply.. :) . Finally I got it by getting and Access token. But I Need to give a final touch on it.........Thank you & your team for the great support which you are giving to all.
This discussion has been closed.