Navigation

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

    how to pass token in authorization for historic api run through postman

    General Discussion
    2
    7
    83
    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
      puna123 last edited by

      hi ,
      i am getting below invalid token error. can anyone help how and what to pass in token. and from where i can get it.
      error screenshot attached for reference.Capture.PNG

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

        @puna123 can anyone help here plzz

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

          HI @puna123 Tokens are generated after you pass your credentials and generate a session.

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

            @admin ,
            are you saying about this feed token . shall we pass this token in our api call through postman.??

            package import statement

            from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
            #import smartapi.smartExceptions(for smartExceptions)

            #create object of call
            obj=SmartConnect(api_key="*****")
            # optional
            # access_token = "your access token",
            # refresh_token = "your refresh_token")

            #login api call

            data = obj.generateSession("","")
            print(data)
            refreshToken= data['data']['refreshToken']

            #fetch the feedtoken
            feedToken=obj.getfeedToken()
            print(feedToken)

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

              Hi @puna123 You need to call login api in post man get your token and pass it into authorization.

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

                @admin ,
                i am using below link for login api call to generate the token .is this the correct link?
                but what should i passs in header and body?

                https://apiconnect.angelbroking.com/rest/auth/angelbroking/jwt/v1/generateTokens

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

                  HI @puna123 As noticed on another thread you have been trying to install python libraries and you are facing issue in it also you are facing issue in using postman we suggest you to get in touch with your dev team to solve your all user specific issues.

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