Announcement

Collapse
No announcement yet.

Login Api Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login Api Problem

    hi,
    i am trying to login my account from postman using the app key (live and delay) both but i am still unable to login that, the same account i am able to login from browser but unable to login from postman using the API. kindly resolve my issue that why i am facing this problem
    Last edited by Shah; 15-07-2020, 03:10 PM.

  • #2
    I'm afraid my telepathy's not working too well today, so you'll have to show us some code and error messages.

    Comment


    • #3
      account is login from betfair website but not from Postmen. i found this response from postmen
      {
      "token": "",
      "product": "myproductCode",
      "status": "FAIL",
      "error": "INVALID_USERNAME_OR_PASSWORD"
      }


      Even User Name and Password and App Key is correct.

      Comment


      • #4
        You sent a log-in request to the API. The API rejected your request. Something is wrong with your request.

        Comment


        • #5
          If you show us your login request, please replace your vital details.

          Comment


          • #6
            I am calling it from postman, it's postman c# generated code

            var client = new RestClient("https://identitysso.betfair.com/api/login");
            client.Timeout = -1;
            var request = new RestRequest(Method.POST);
            request.AddHeader("Accept", "application/json");
            request.AddHeader("X-Application", "XXXXXXXXXXXXXX");
            request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
            request.AddParameter("application/x-www-form-urlencoded", "username=MyUserName&password=XXXXXXXXX", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
            Console.WriteLine(response.Content);


            Response:

            {
            "token": "",
            "product": "myproductCode",
            "status": "FAIL",
            "error": "INVALID_USERNAME_OR_PASSWORD"
            }
            Last edited by Shah; 17-07-2020, 02:11 PM.

            Comment


            • #7
              I'm looking into this, but I don't have a test environment. Could I get you to change one of your lines and attempt the login again?

              Change

              request.AddParameter("application/x-www-form-urlencoded", "username=MyUserName&password=XXXXXXXXX",Parameter Type.RequestBody);

              to

              request.AddParameter("application/x-www-form-urlencoded", ""username": "MyUserName", "password": "XXXXXXXXX"",ParameterType.RequestBody);

              This makes the userid and password details into JSON format. I'm uncertain whether all the quotation marks are necessary.

              Comment


              • #8
                Originally posted by jabe View Post
                I'm looking into this, but I don't have a test environment. Could I get you to change one of your lines and attempt the login again?

                Change

                request.AddParameter("application/x-www-form-urlencoded" Lego 2k drive​ "username=MyUserName&password=XXXXXXXXX",Param eter Type.RequestBody);

                to

                request.AddParameter("application/x-www-form-urlencoded", ""username": "MyUserName", "password": "XXXXXXXXX"",ParameterType.RequestBody);

                This makes the userid and password details into JSON format. I'm uncertain whether all the quotation marks are necessary.
                I have the same problem, I tried again my requests are still denied
                Last edited by Miranda32; 05-06-2023, 09:35 AM.

                Comment

                Working...
                X