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
Login process overview
Collapse
This is a sticky topic.
X
X
-
-
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 ?
Comment
-
Certainly the app key will, i'm assuming you would need to get a session token everytime you had to log in.Originally posted by OliasOfSunhillow View PostI 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 ?
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.
Comment
-
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.
Comment
-
You should replace "yourp12password" with the password you set when you generated your client-2048.csr file.Originally posted by vic View PostX509Certificate2 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.
Comment
-
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
Comment
-
-
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?
Comment
-
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 linesBetfair Bots Made Easy
Comment
-
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.
Comment
-
Just a regular POST with data like this:
username=XXXXX&password=XXXXXX&otherstuff=XXXXX
The working example is
Do you have idea of what curl 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
Betfair Bots Made Easy
Comment
-
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.Originally posted by AlgoTrader View PostJust a regular POST with data like this:
username=XXXXX&password=XXXXXX&otherstuff=XXXXX
The working example is
Do you have idea of what curl 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
Comment
-
Curl is not a markup language. It is HTTP request testing tool. Before programming any request in any language, it is usually good idea to make it working with curl. You browser is not very good to send post requests with manually prepared data, that's the area where curl shinesOriginally posted by uncletone1 View PostI 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.
After curl proto work, just do the same in programminbg language. It usually much easier to implement that you know for sure it works, which headers/cookies to send and what server returns.Betfair Bots Made Easy
Comment


Comment