Navigation

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

    login issue

    Python SDK
    2
    10
    17
    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.
    • H
      harish9814 last edited by

      Status Code: 200
      Response length: 247
      The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 12635002845532818618

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

        Hi @harish9814

        Please let us know which API are you trying to consume.

        H 1 Reply Last reply Reply Quote 0
        • H
          harish9814 @admin last edited by

          @admin SMART API Websocket and Historical API REST both

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

            Hi @harish9814

            Please post the API endpoints here to verify.

            H 1 Reply Last reply Reply Quote 0
            • H
              harish9814 @admin last edited by

              @admin # SmartAPI REST login endpoint: https://apiconnect.angelone.in/rest/auth/angelbroking/user/v1/loginByPassword
              SmartAPI feed token endpoint: https://apiconnect.angelone.in/rest/secure/angelbroking/market/v1/quote
              Historical Candle Data endpoint: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData

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

                Hi @harish9814

                Yes API endpoints are fine. From our side we verified these APIs working fine. Can you test & confirm any one of the API from postman.

                H 1 Reply Last reply Reply Quote 0
                • H
                  harish9814 @admin last edited by harish9814

                  @admin
                  [I 251114 14:44:44 smartConnect:124] in pool
                  Attempting MPIN login for client: H72897
                  MPIN login successful
                  INFO:main:✅ Login successful!
                  INFO:main:Auth Token: Bearer eyJhbGciOiJIU...
                  INFO:main:Session Token: N/A (not provided by API)
                  INFO:main:Feed Token: eyJhbGciOiJIUzUxMiJ9...
                  (venv) PS C:\sher_momentum_ai_agent_pro_plus_x7> python -c "from sher.realtime_feed import RealtimeIngest; rt = RealtimeIngest(['RELIANCE']); rt.start(); import time; time.sleep(10); rt.stop()"
                  Token expired or not cached, refreshing...
                  Auth attempt 1 failed: 400 Client Error: for url: https://apiconnect.angelone.in/rest/auth/angelbroking/user/v1/loginByPassword
                  Auth attempt 2 failed: 400 Client Error: for url: https://apiconnect.angelone.in/rest/auth/angelbroking/user/v1/loginByPassword
                  Auth attempt 3 failed: 400 Client Error: for url: https://apiconnect.angelone.in/rest/auth/angelbroking/user/v1/loginByPassword
                  2025-11-14 14:45:32,837 ERROR Authentication failed: Auth failed after retries
                  2025-11-14 14:45:34,097 ERROR get_feed_token_v2 non-json: The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 6660992731782133645

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

                    Hi @harish9814

                    Verified from logs on the same time frame. I can see success logs. Can you try with postman once and confirm

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      harish9814 @admin last edited by

                      @admin 00.PNG

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

                        Hi @harish9814

                        Pls confirm are you passing below mandatory headers to Login API

                        X-PrivateKey
                        X-SourceID
                        X-MACAddress
                        

                        doc: https://smartapi.angelbroking.com/docs/User

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