No announcement yet.

Login using username and password.

  • 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:

    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("");
    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:

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


    • #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 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: 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