Navigation

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

    Ardent

    @Ardent

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

    Ardent Follow

    Best posts made by Ardent

    This user hasn't posted anything yet.

    Latest posts made by Ardent

    • RE: What is the issue with this request.. Im getting Invalid Token error

      @Phanilbb said in What is the issue with this request.. I'm getting Invalid Token error:

      I have not changed but tried different

      import requests
      def get_profile(angel_one_details, jwt_token):
      RuntimeError: If the API request fails with a non-200 status code
      "https://apiconnect.angelbroking.com/rest/secure/angelbroking/user/v1"
      profile_endpoint = "getProfile"
      headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'X-UserType': 'USER',
      'X-SourceID': 'WEB',
      'X-PrivateKey': angel_one_details['api_key'],
      'Authorization': f"Bearer {jwt_token}" }
      url = f"{base_url}/{profile_endpoint}"
      response = requests.get(url, headers=headers)
      if response.status_code == 200:
      return response.json()
      else:
      raise RuntimeError(f"API request failed with status code: {response.status_code}")

      I hope it

      posted in General Discussion
      A
      Ardent
    • RE: Connection Error while login.

      @Phanilbb said in Connection Error while login.:

      angel

      Write a clean code
      If errors.CustomError is a custom class, import it from its module.
      also, Validate the JSON response structure.
      Correct "Angle" to "Angel" in the error message

      posted in Bugs
      A
      Ardent