Login Api Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Miranda32
    replied
    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, 08:35 AM.

    Leave a comment:


  • jabe
    replied
    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.

    Leave a comment:


  • Shah
    replied
    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, 01:11 PM.

    Leave a comment:


  • jabe
    replied
    If you show us your login request, please replace your vital details.

    Leave a comment:


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

    Leave a comment:


  • Shah
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • Shah
    started a topic Login Api Problem

    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, 02:10 PM.
Working...
X