Navigation

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

    Issue with call API using Postman

    General Discussion
    4
    6
    152
    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.
    • S
      S_DEV last edited by

      I am trying to access Smart API using Postman, but stuck at generate JWT token. I made POST request with https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword but it return 400 Bad Request.

      Below parameters I passed along with request:

      Headers
      PrivateKey: API_KEY

      Request body
      {
      "clientcode":"clientid",
      "password":"password"
      }

      Can anyone please suggest any solution or correct way to make Smart API request from Postman?

      1 Reply Last reply Reply Quote 0
      • N
        nitish.bane last edited by

        Hi, I am facing the same issue can you please help me if your are able to fix this?

        O 1 Reply Last reply Reply Quote 0
        • O
          olp @nitish.bane last edited by

          @nitish-bane
          You need to pass Complete header with above api.

          headers : {
          'Content-Type': 'application/json',
          'Accept': 'application/json',
          'X-UserType': 'USER',
          'X-SourceID': 'WEB',
          'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
          'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
          'X-MACAddress': 'MAC_ADDRESS',
          'X-PrivateKey': 'API_KEY'
          }

          J 1 Reply Last reply Reply Quote 0
          • J
            javed.khan @olp last edited by javed.khan

            @Kartik-Upadhyay @admin I m not getting about below four parameters USER,WEB,LOCAL IP and API_KEY , also please let me know that would I have to input , 8 digit Api key or Secret Key which I have created through Angel smart Api while sending request through Postman Software ?

            O 1 Reply Last reply Reply Quote 0
            • O
              olp @javed.khan last edited by

              @sarvesh-kumar
              'USER' AND 'WEB' USE AS IT IS.
              LOCAL IP : 192.168.1.50 (any ip)
              You don't need secret key for loginbypassword api.

              Use your 8 digit app key.

              J 1 Reply Last reply Reply Quote 0
              • J
                javed.khan @olp last edited by javed.khan

                @Kartik-Upadhyay Thank You so much Kartik for faster reply. I kept USER , WEB as it is and LOCAL ip/mac id through ipconfig/all and took public ip through google by search "my ip" but still getting below error in Postman software :

                Status : 200ok
                {
                "success": false,
                "message": "Invalid Token",
                "errorCode": "AG8001",
                "data": ""
                }

                For your kind information , I did not enter anywhere my client id and password.

                I have used below info in postman software :
                https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getLtpData

                Type : POST
                and body below :

                {
                "data": {
                "exchange":"NSE",
                "tradingsymbol":"SBIN-EQ",
                "symboltoken":"3045"
                }
                }

                Please check it if possible.

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