Why neither request url is unavailable for me?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jacky
    Junior Member
    • Dec 2018
    • 21

    #1

    Why neither request url is unavailable for me?

    Hello,
    Why is response result null?
    My request post data is as below:
    Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params" :{"filter":{}}, "id": 1}]
    Response: null
    request url is https://api-au.betfair.com/exchange/betting/json-rpc/v1

    But when request url is https://api.betfair.com/exchange/betting/json-rpc/v1
    as as result of Response: [{"jsonrpc":"2.0","result":[],"id":1}]

    Why?
    Neither available for me!


  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    The only difference I can see between your call that doesn't return null and mine is that your spacing is different (and inconsistent).

    The first is yours, which you say doesn't work, and the second is mine, which does work.

    { "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params" :{"filter":{}}, "id": 1}
    {"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params": {"filter": {}},"id": 1}

    These can be more easily compared in NotePad.

    See if fixing your spacing works on the standard endpoint. I don't know why the call to the Australian endpoint fails. Are you signed on appropriately to use the Australian one? I haven't used it.

    Comment

    • Jacky
      Junior Member
      • Dec 2018
      • 21

      #3
      Originally posted by jabe View Post
      The only difference I can see between your call that doesn't return null and mine is that your spacing is different (and inconsistent).

      The first is yours, which you say doesn't work, and the second is mine, which does work.

      { "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params" :{"filter":{}}, "id": 1}
      {"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params": {"filter": {}},"id": 1}

      These can be more easily compared in NotePad.

      See if fixing your spacing works on the standard endpoint. I don't know why the call to the Australian endpoint fails. Are you signed on appropriately to use the Australian one? I haven't used it.
      Thank you for you support!
      I fix the space in post data code.
      Right now I get response like this: {"jsonrpc":"2.0","result":[],"id":1}
      Why is the result empty? Seemly for me all endpoints response empty result....
      What's wrong with my request?

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        The endpoint in my program has a slash at the end, like this:

        https://api.betfair.com/exchange/betting/json-rpc/v1/

        In the documentation, of the two global endpoints, one has a slash at the end and the other doesn't. Could you try yours with the extra slash and see if that helps?

        Comment

        • Jacky
          Junior Member
          • Dec 2018
          • 21

          #5
          Originally posted by jabe View Post
          The endpoint in my program has a slash at the end, like this:

          https://api.betfair.com/exchange/betting/json-rpc/v1/

          In the documentation, of the two global endpoints, one has a slash at the end and the other doesn't. Could you try yours with the extra slash and see if that helps?
          I am afraid no help....
          I have tried add slash, but as a result of the same empty result.

          Post Data: [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "params" :{"filter":{}}, "id": 1}]
          Response: [{"jsonrpc":"2.0","result":[],"id":1}]

          I am using sample PHP code.
          Here is screenshot ,https://screenshot.net/v33ps41 password is 123

          Wired......
          Last edited by Jacky; 15-12-2018, 01:54 AM.

          Comment

          • jabe
            Senior Member
            • Dec 2014
            • 705

            #6
            Looking at the top of your screenshot, you have an error happening on the first line. I can't tell whether that comes before the listEventTypes call and I wonder if that error is preventing your listEventTypes call from working.

            It has returned a code of -32602, also called DSC-0018.

            I've searched for the error code and this is an offline PDF containing a copy of the documentation. It will be easier for you to search and read if you download it:

            https://docs.developer.betfair.com/p...de-Offline.pdf

            There is a list of chapters at the beginning of the PDF and it says the error codes are on page 205. However, confusingly the pages in the PDF are not numbered. However, Common Error Codes are listed near the end of the document.

            The DSC-0018 error means that a parameter that should have been included in a call was missing. What should be happening before the listEvenTypes call?

            Comment

            • Jacky
              Junior Member
              • Dec 2018
              • 21

              #7
              Originally posted by jabe View Post
              Looking at the top of your screenshot, you have an error happening on the first line. I can't tell whether that comes before the listEventTypes call and I wonder if that error is preventing your listEventTypes call from working.

              It has returned a code of -32602, also called DSC-0018.

              I've searched for the error code and this is an offline PDF containing a copy of the documentation. It will be easier for you to search and read if you download it:

              https://docs.developer.betfair.com/p...de-Offline.pdf

              There is a list of chapters at the beginning of the PDF and it says the error codes are on page 205. However, confusingly the pages in the PDF are not numbered. However, Common Error Codes are listed near the end of the document.

              The DSC-0018 error means that a parameter that should have been included in a call was missing. What should be happening before the listEvenTypes call?
              Thank you ,Jabe.
              By the way, I have not login whatever Non-interactive login or Interactive login, is that the reason that this issue happens?

              Comment

              • jabe
                Senior Member
                • Dec 2014
                • 705

                #8
                Originally posted by Jacky View Post
                Thank you ,Jabe.
                By the way, I have not login whatever Non-interactive login or Interactive login, is that the reason that this issue happens?
                Aha! Yes it is.

                Comment

                Working...
                X