What am I missing here?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kinch577
    Junior Member
    • Mar 2009
    • 2

    #1

    What am I missing here?

    Either I'm being really stupid (likely) or I'm missing something obvious... but how does one login to the games api? I've looked through the source code for the uber client, and all I can see is a http request, and I don't have visual studio installed so I can't debug UberClient and take a look at the data packets before they're sent out. Does it use the same session method as the normal API ?
  • elmariachi
    Junior Member
    • Feb 2009
    • 16

    #2
    Originally posted by kinch577 View Post
    Either I'm being really stupid (likely) Does it use the same session method as the normal API ?
    No. Its an etirely different way of access. The games API uses REST insetad of SOAP as a protocol.
    There is no "sessionToken" at all. You need to submit your username and password with every request again.

    Here is a sample:
    Code:
    GET /rest/v1?username=sampleuser HTTP/1.1
    Host: api.games.betfair.com
    Accept-Encoding: gzip,deflate
    Keep-Alive: 300
    Connection: keep-alive
    gamexAPIPassword: samplepassword
    I left out some addtional things like the agentId that you need to get from betfair before getting started, alos the agentinstance is not specified.

    Please keep in ming that for non public commands you also need to use POST instead of GET.

    Here you can find the games api documentation (Im guessing you got that already): http://bdpsupport.betfair.com/ics/su...p?fileID=43981

    The API schema can be found here: http://bdpsupport.betfair.com/ics/su...p?fileID=43852

    If youre using java this might be a good place to start: http://bdpsupport.betfair.com/ics/su...p?fileID=44059

    What language are you using? I might be able to spin you up an example if I know the language

    E

    Comment

    • nzbot
      Junior Member
      • Feb 2009
      • 14

      #3
      I have posted C# source code for generating a valid agent instance ID:
      http://forum.bdp.betfair.com/showthread.php?t=203

      Comment

      • nzbot
        Junior Member
        • Feb 2009
        • 14

        #4
        Originally posted by elmariachi View Post
        I left out some addtional things like the agentId that you need to get from betfair before getting started, alos the agentinstance is not specified.
        Do we really need to get the agent ID from Betfair? I use a custom agent ID, looks like "myname@company.com.xgamesbot.1.0" and an instance ID generated as specified in the doc, it works like a charm (at least in the API test bed).

        Betfair guys: What about this? Do we really need to use an agent ID provided by Betfair or can we continue to use our custom agent IDs?

        Comment

        • elmariachi
          Junior Member
          • Feb 2009
          • 16

          #5
          Originally posted by nzbot View Post
          Do we really need to get the agent ID from Betfair? I use a custom agent ID, looks like "myname@company.com.xgamesbot.1.0" and an instance ID generated as specified in the doc, it works like a charm (at least in the API test bed).

          Betfair guys: What about this? Do we really need to use an agent ID provided by Betfair or can we continue to use our custom agent IDs?
          I just repeated what was stated in the reference. If this is not correct anymore .. even better

          E

          Comment

          • kinch577
            Junior Member
            • Mar 2009
            • 2

            #6
            A big thank you to everyone, especially elmariachi. In fact, I had not gotten the API documentation (I remember looking around for it when I first started looking into the API... I found the sports api documentation easily and worked with that first...) Now that I have it, I can actually have some documentation to read that might help! Phew. I'm writing a test-bed in perl (since it's easy and I'm a lazy programmer lol) but I don't know if I'll ever write anything "bigger". This is just a small project for me, I'm not really interested in making a full-featured client. If a perl script works, then stick with it

            I've downloaded everything I can find about the games api and will spend a few days reading through it all. Big thanks to everyone here again. Expect to hear from me again in a few days when I respond that I've read through everything and have no idea what I'm doing lol

            Comment

            • elmariachi
              Junior Member
              • Feb 2009
              • 16

              #7
              You're welcome.

              And please report back when you get it working. Maybe you could write a small howto about getting started with the Games API. There is not much about that around, especially in Perl.

              E

              Comment

              Working...
              X