Hi!
I am new to the Betfair Exchange APIs but not due to software development generally. I am really struggling to make a good start on this and would really appreciate some help please.
My C# application can successfully log in with the "non-interactive" method and generate a session token, which I put in the "X-Authentication" and "ssoid" HTTP Headers.
I have successfully got data from one of the historic data APIs and now I'm trying to get some from the sports betting APIs, but my request keeps failing. The HTTP response I get back is Status Code 400: Bad Request, with the JSON {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}
I looked up this error code 32700 and it's because of Invalid JSON.
I ran the JSON of my request through a validator and it seems to be valid. Here it is:
{"methodname":"SportsAPING/v1.0/listEvents","filter":{},"locale":""}
It's the simplest JSON I could think of for testing: an empty filter, a blank locale, and the method name. Can't get simpler than that!
Can anybody see what I did wrong please? I have been fiddling around with it for days and failed to make a successful POST to the sports betting API.
Many thanks!
I am new to the Betfair Exchange APIs but not due to software development generally. I am really struggling to make a good start on this and would really appreciate some help please.
My C# application can successfully log in with the "non-interactive" method and generate a session token, which I put in the "X-Authentication" and "ssoid" HTTP Headers.
I have successfully got data from one of the historic data APIs and now I'm trying to get some from the sports betting APIs, but my request keeps failing. The HTTP response I get back is Status Code 400: Bad Request, with the JSON {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}
I looked up this error code 32700 and it's because of Invalid JSON.
I ran the JSON of my request through a validator and it seems to be valid. Here it is:
{"methodname":"SportsAPING/v1.0/listEvents","filter":{},"locale":""}
It's the simplest JSON I could think of for testing: an empty filter, a blank locale, and the method name. Can't get simpler than that!
Can anybody see what I did wrong please? I have been fiddling around with it for days and failed to make a successful POST to the sports betting API.
Many thanks!


Comment