Announcement

Collapse
No announcement yet.

Login using username and password.

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

  • Login using username and password.

    Can anyone help me out with the login process using my own form.

    POST Example

    Accept: application/json

    X-Application: <AppKey>

    Content-Type: application/x-www-form-urlencoded

    URL endpoint: https://identitysso.betfair.com/api/login

    I understand that this is the waty that is is done but unsure about how to do this using c#. I have no experience using cUrl so find the documentation confusing.

    Below is a API call i made in a previus application. Can i do the Betfair Login API call in the same way?

    HttpWebRequest request =(HttpWebRequest)WebRequest.Create("http://api.football-data.org/v1/soccerseasons/354/fixtures/?matchday=22");
    request.Headers.Add("AUTHORIZATION", "Basic YTph");
    request.ContentType = "text/html";
    request.Method = "GET";
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader stream = new StreamReader(response.GetResponseStream());
    string ResultAsText = stream.ReadToEnd().ToString();

    Thanks in advance...

  • #2
    Have a look at this: http://forum.bdp.betfair.com/showthread.php?t=2164

    It's close to what I've got in VB.NET.

    Comment


    • #3
      Yes, for login you use "similar" code, similar in the way you use GET HttpWebRequest.

      In your code you redundantly call ToString method as the ReadToEnd actually returns string already.

      I use/used api.football-data.org as well, but as the source of data is maybe from Germany there is a problem with data synchronization.

      You can see it at the end of my video here:

      http://bfexplorer.net/Community/Blog...nd Predictions

      therefore for automated football strategies I use different source of match feed data.

      If you are interested you can use my app for free when fulfilling T&C, so this way you can really spent your time only for bot strategy code development.
      betfair bot platform, bfexplorer bot sdk

      https://github.com/StefanBelo/BetfairBotSDK

      Comment

      Working...
      X