Originally posted by jabe
View Post
Login Api Problem
Collapse
X
-
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:
-
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:
-
You sent a log-in request to the API. The API rejected your request. Something is wrong with your request.
Leave a comment:
-
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:
-
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:
-
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 problemLast edited by Shah; 15-07-2020, 02:10 PM.


Leave a comment: