Login process overview

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts

  • uncletone1
    replied
    Originally posted by AlgoTrader View Post
    Just a regular POST with data like this:

    username=XXXXX&password=XXXXXX&otherstuff=XXXXX

    The working example is

    Code:
    curl -v -c cookies.txt -d "username=Username&password=password&login=true&redirectMethod=POST&product=home.betfair.int&url=https://www.betfair.com/" https://identitysso.betfair.com/api/login
    Do you have idea of what curl is?
    I know its a form of mark up language but thats as far as it goes (dont know how to write it or implement it). I use C#, so i'm trying to find an example of taking the above and creating a C# sample httpwebrequest (or whatever is required) to achieve the same result.

    Leave a comment:


  • AlgoTrader
    replied
    Just a regular POST with data like this:

    username=XXXXX&password=XXXXXX&otherstuff=XXXXX

    The working example is

    Code:
    curl -v -c cookies.txt -d "username=Username&password=password&login=true&redirectMethod=POST&product=home.betfair.int&url=https://www.betfair.com/" https://identitysso.betfair.com/api/login
    Do you have idea of what curl is?

    Leave a comment:


  • uncletone1
    replied
    All the stuff is optional except of 3. In fact, I don't need HTML from Betfair to display form, the exceptions are countries like Denmark that require extra stuff

    Working with HTML stuff is not a great deal, just a several JavaScript lines

    So how do i format the send

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

    to include the Uname and Password.

    Leave a comment:


  • AlgoTrader
    replied
    The interactive login consists of three steps.

    1) loading HTML stuff and displaying it from
    https://identitysso.betfair.com/view/login

    2) filling fields in HTML form

    3) sending form data to
    https://identitysso.betfair.com/api/login

    All the stuff is optional except of 3. In fact, I don't need HTML from Betfair to display form, the exceptions are countries like Denmark that require extra stuff

    Working with HTML stuff is not a great deal, just a several JavaScript lines
    Last edited by Mr Stokes; 22-08-2013, 02:05 PM. Reason: code block removed

    Leave a comment:


  • uncletone1
    replied
    Right. I have got the interactive option working as per the instructions for C#

    https://api.developer.betfair.com/se...op+Application


    I put a web browser my winform. Have the URL set to
    http:// identitysso.betfair.com

    and I catch the return cookie and get the session token. Yay!!

    My new question... is there a way of sending the U/Name and Password in the URL?

    I'm guessing as a HttpWebRequest maybe?

    Leave a comment:


  • vic
    replied
    Ok thanks, I got the wrong end of the stick, all is clear now. It was/is a seismic shift from API6 but like most improvements I suppose it will be easier for us once we get stuck into it.

    Leave a comment:


  • heja
    replied
    https://api.developer.betfair.com/se...28bot%29+login

    Leave a comment:


  • OliasOfSunhillow
    replied
    I think what we need here is a simple step by step account of how to create your client-2048.csr file, where it go's etc

    Leave a comment:


  • vic
    replied
    Thank you for your reply heja but I don't recall generating a client-2048.csr file. At the risk of sounding stupid, this is only a bot I want to write for myself not for any clients.

    Leave a comment:


  • heja
    replied
    Originally posted by vic View Post
    X509Certificate2 x509certificate = new X509Certificate2("client-2048.p12", "yourp12password");
    The example doesn't work for me cos of this line. I've put my password in where it says "yourp12password" but I'm guessing that is not right. Please correct me someone.
    You should replace "yourp12password" with the password you set when you generated your client-2048.csr file.

    Leave a comment:


  • vic
    replied
    X509Certificate2 x509certificate = new X509Certificate2("client-2048.p12", "yourp12password");
    The example doesn't work for me cos of this line. I've put my password in where it says "yourp12password" but I'm guessing that is not right. Please correct me someone.

    Leave a comment:


  • uncletone1
    replied
    Originally posted by OliasOfSunhillow View Post
    I presume this means that the app key and session token generated can now be used in any program I copy or write to access the API ?
    Certainly the app key will, i'm assuming you would need to get a session token everytime you had to log in.
    If you have any luck programming this (Getting the session token without the visualiser) i'd be grateful for the knowledge. Even better if its in C#

    Tony.

    Leave a comment:


  • OliasOfSunhillow
    replied
    I presume this means that the app key and session token generated can now be used in any program I copy or write to access the API ?

    Leave a comment:


  • OliasOfSunhillow
    replied
    Agh that seems to have done the trick. The confusion comes with the login button, it looks like you are supposed to enter a session token in order to click login when in fact clicking login throws up a prompt box to login with your userid and password

    Leave a comment:


  • uncletone1
    replied
    Originally posted by OliasOfSunhillow View Post
    It throws an error saying that a session token is required ??
    Make sure you have logged in first. As sucessfull visualiser login has always given me a session token. Hence why i'm trying to replacate this with C#.

    Leave a comment:

Working...
X