Originally posted by AlgoTrader
View Post
Login process overview
Collapse
This is a sticky topic.
X
X
-
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.
-
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
Leave a 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.
Leave a 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 lines
Leave a 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?
Leave a comment:
-
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:
-
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:
-
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:
-
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.
Leave a 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.
Leave a 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.
Leave a comment:
-
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:
-
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:
-
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#.Originally posted by OliasOfSunhillow View PostIt throws an error saying that a session token is required ??
Leave a comment:


Leave a comment: