Hi
I am looking into switching my App. over from an interactive login to non interactive login using a Certificate
I downloaded the Betfair sample C# code https://github.com/betfair/API-NG-sa...ractive-cSharp
I have zero experience in this area, so bear with me for some dumb questions. The Betfair developer docs page doesnt help as its close to incomprehensible.
I have created a *.crt file and uploaded it to my Betfair account. It swallowed it ok, but no idea if I created correctly or not.
I have created a * pem file and a *.p12 file, havent the foggiest if they are correct or not.
Q1) When i create *.crt,*.pem,*p12 files, I dont think I need to embed my personal Betfair username and Betfair password into them ? I was bit unclear on this.
Q2) When I run the Betfair non interactive sample code, I have to input, my Appkey, my Betfair username/password and path to p12 file. I think I am totally missing the point here but I thought the whole point of a non interactive login is that i dont need to enter username and password ?
i mean I could get my existing code to login non interactively by just saving username and password to disk and reading it at login time (Yes I know that is against the Betfair rules).
If for the non interactive login I have to hardcode into my App my username and password (or type it in manually on login) whats the point ?
Can someone give me an overview of how this non interactive login is meant to work ?
Q3 When I run the sample non interactive code I get the response "loginStatus":"CERT_AUTH_REQUIRED". This means either my certs arent found or arent correct. Any clues on how I go about debugging this ? Not sure where to begin even.
Note For Betfair:
To even get to this point I had to waste several hours figuring out why your sample code doesnt even work on a bog standard Win10 install here. It receives no valid response back from the Server
The error message you get is really helpful, it says "An error occurred"
I tracked the problem down to an incompatible TLS version.
To fix it I had to add this line to the function initHttpClientInstance()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
It can now communicate, but gets the CERT_AUTH_REQUIRED error
!!!! BEFAIR PLEASE FIX YOUR SAMPLE CODE, ITS VERY FRUSTRATING WHEN SAMPLE CODE DONT WORK !!!!
Thanks for any help on this
Geoff
I am looking into switching my App. over from an interactive login to non interactive login using a Certificate
I downloaded the Betfair sample C# code https://github.com/betfair/API-NG-sa...ractive-cSharp
I have zero experience in this area, so bear with me for some dumb questions. The Betfair developer docs page doesnt help as its close to incomprehensible.
I have created a *.crt file and uploaded it to my Betfair account. It swallowed it ok, but no idea if I created correctly or not.
I have created a * pem file and a *.p12 file, havent the foggiest if they are correct or not.
Q1) When i create *.crt,*.pem,*p12 files, I dont think I need to embed my personal Betfair username and Betfair password into them ? I was bit unclear on this.
Q2) When I run the Betfair non interactive sample code, I have to input, my Appkey, my Betfair username/password and path to p12 file. I think I am totally missing the point here but I thought the whole point of a non interactive login is that i dont need to enter username and password ?
i mean I could get my existing code to login non interactively by just saving username and password to disk and reading it at login time (Yes I know that is against the Betfair rules).
If for the non interactive login I have to hardcode into my App my username and password (or type it in manually on login) whats the point ?
Can someone give me an overview of how this non interactive login is meant to work ?
Q3 When I run the sample non interactive code I get the response "loginStatus":"CERT_AUTH_REQUIRED". This means either my certs arent found or arent correct. Any clues on how I go about debugging this ? Not sure where to begin even.
Note For Betfair:
To even get to this point I had to waste several hours figuring out why your sample code doesnt even work on a bog standard Win10 install here. It receives no valid response back from the Server
The error message you get is really helpful, it says "An error occurred"
I tracked the problem down to an incompatible TLS version.
To fix it I had to add this line to the function initHttpClientInstance()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
It can now communicate, but gets the CERT_AUTH_REQUIRED error
!!!! BEFAIR PLEASE FIX YOUR SAMPLE CODE, ITS VERY FRUSTRATING WHEN SAMPLE CODE DONT WORK !!!!
Thanks for any help on this
Geoff


Comment