Login post request returns status 200 but doesn't return json

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sssaaammm
    Junior Member
    • Aug 2021
    • 3

    #1

    Login post request returns status 200 but doesn't return json

    I am trying to login to the api, and have followed the documentation, but i am getting a 200 status HTML response saying:

    OOPS, SORRY ABOUT THAT

    This page doesn't seem to exist.

    Anyone else have this issue?
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    It would help if you could show us the code you used and if you paste the actual messages returned. A summary of your system, including your operating system could help too.

    Comment

    • sssaaammm
      Junior Member
      • Aug 2021
      • 3

      #3
      Thanks for the quick response.

      I made the post request using Postman, details are:

      url: https://identitysso-cert.betfair.com/api/certlogin

      {
      "username": "<username>",
      "password": "<password-for-betfair>"
      }

      headers:
      Accept: application/json
      X-Application: <app-key>
      Content-Type: application/x-www-form-urlencoded

      I'm using a 2020 M1 Mac running Big Sur.

      A screenshot of the response is attached.

      Thanks in advance!
      You do not have permission to view this gallery.
      This gallery has 1 photos.

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        I haven't used Postman or the non-interactive login. The URL is as it should be. Could you point me to wherever the Postman stuff is? I'll take a look and see if anything leaps out.

        Comment

        • sssaaammm
          Junior Member
          • Aug 2021
          • 3

          #5
          It's using this API client: https://www.postman.com/

          I've got it working using Python, but would be good to get postman working.

          Seems using Python the 'Content-Type: application/x-www-form-urlencoded' isn't needed, but then when using Postman I get an error:

          HTTP Status 400 - Required String parameter 'username' is not present

          No problem if you can't get it working I will just use Python, but Postman is good for testing stuff API responses quickly.
          Last edited by sssaaammm; 13-08-2021, 03:25 PM.

          Comment

          Working...
          X