Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    getting generateSession(clientId, password)

    NodeJS SDK
    2
    6
    64
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pas22021990 last edited by

      I am getting user null when user = smartConnect.generateSession(clientId, password) is called.
      below is my code snippet.
      SmartConnect smartConnect = new SmartConnect(<api key>);
      User user = smartConnect.generateSession(clientId,password);

      Note: When i executed it first time it worked fine. second time onwards getting user null.
      is it because of session related error?

      A P 2 Replies Last reply Reply Quote 0
      • A
        admin @pas22021990 last edited by

        HI @pas22021990 have you migrated your account.

        P 1 Reply Last reply Reply Quote 0
        • P
          pas22021990 @admin last edited by

          @admin I called customer support but they said they will arrange callback. I am not received any callback. Could you please migrate my id S387068

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @pas22021990 last edited by

            HI @pas22021990 Its seems you have posted same queries on multiple threads please note your account has bee migrated.

            1 Reply Last reply Reply Quote 0
            • P
              pas22021990 @pas22021990 last edited by pas22021990

              @pas2202199Now getting below error while calling generateSession.

              {"sourceID":"WEB","clientPublicIP":"103.254.55.13","macAddress":"20-47-47-D6-39-3B","userType":"USER","clientLocalIP":"192.168.1.100","accept":"application/json"}Exception in thread "main" java.lang.NoSuchMethodError: okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;
              at com.angelbroking.smartapi.http.SmartAPIRequestHandler.createPostRequest(SmartAPIRequestHandler.java:305)
              at com.angelbroking.smartapi.http.SmartAPIRequestHandler.postRequest(SmartAPIRequestHandler.java:132)
              at com.angelbroking.smartapi.SmartConnect.generateSession(SmartConnect.java:171)
              at com.oat.smartapitest.SmartApiClient.main(SmartApiClient.java:26)

              A 1 Reply Last reply Reply Quote 0
              • A
                admin @pas22021990 last edited by

                HI @pas22021990 Above provided information is insufficient to analyze the issue.
                Please go through the below doc and follow the process.
                https://github.com/angelbroking-github/smartapi-java

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post