Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. shivamrajvansh
    S
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    shivamrajvansh

    @shivamrajvansh

    1
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    shivamrajvansh Follow

    Best posts made by shivamrajvansh

    • Invalid Token

      I am able to use SmartAPI.GenerateSession with TOTP. Using the token response with jwtToken and refreshToken I am able to get success response from smartApi.GetProfile() as well. This is working when executed in one function call.

      But I am getting Invalid Token AG8001 error when calling separately.

      I save jwtToken, refreshToken in DB after successful Login.
      Then i try to call GetProfile method using below code, passing tokens as string:
      var smartApi = new SmartApi(Trading_PrivateKey, Trading_jwtToken, Trading_refreshToken, "");
      var data = smartApi.GetProfile();

      I get Invalid Token error with all endpoints.

      I have also tried to login using all 4 types of APIs offered by SmartAPI but i get token error in all the cases.

      Please let me know in case more information is required.

      posted in C#/.Net SDK
      S
      shivamrajvansh

    Latest posts made by shivamrajvansh

    • Invalid Token

      I am able to use SmartAPI.GenerateSession with TOTP. Using the token response with jwtToken and refreshToken I am able to get success response from smartApi.GetProfile() as well. This is working when executed in one function call.

      But I am getting Invalid Token AG8001 error when calling separately.

      I save jwtToken, refreshToken in DB after successful Login.
      Then i try to call GetProfile method using below code, passing tokens as string:
      var smartApi = new SmartApi(Trading_PrivateKey, Trading_jwtToken, Trading_refreshToken, "");
      var data = smartApi.GetProfile();

      I get Invalid Token error with all endpoints.

      I have also tried to login using all 4 types of APIs offered by SmartAPI but i get token error in all the cases.

      Please let me know in case more information is required.

      posted in C#/.Net SDK
      S
      shivamrajvansh
    • Invalid Token

      I am able to use SmartAPI.GenerateSession with TOTP. Using the token response with jwtToken and refreshToken I am able to get success response from smartApi.GetProfile() as well. This is working when executed in one function call.

      But I am getting Invalid Token AG8001 error when calling separately.

      I save jwtToken, refreshToken in DB after successful Login.
      Then i try to call GetProfile method using below code, passing tokens as string:
      var smartApi = new SmartApi(Trading_PrivateKey, Trading_jwtToken, Trading_refreshToken, "");
      var data = smartApi.GetProfile();

      I get Invalid Token error with all endpoints.

      I have also tried to login using all 4 types of APIs offered by SmartAPI but i get token error in all the cases.

      Please let me know in case more information is required.

      posted in C#/.Net SDK
      S
      shivamrajvansh