FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. json
    Log in to post
    • All categories
    • S

      Solved Receiving `[invalidJSON]` error when making FusionAuth API calls

      Q&A
      • api error json • • spencer
      2
      0
      Votes
      2
      Posts
      1.8k
      Views

      S

      HTTP clients, not just Axios, may impose their own requirements for building a valid request or have their own quirks to deal with.

      In this case the error can be resolved by providing a Content-Length header with the length of the JSON request data when making the API request via Axios.

      If you experience issues with a particular HTTP client, it may be helpful to compare the behavior with another client or check whether there are HTTP headers that may be required by the client.

    • M

      Solved Invalid JSON error when trying to retrieve users using user API

      Q&A
      • erro json user-api • • munkith.abid
      3
      1
      Votes
      3
      Posts
      3.1k
      Views

      M

      @dan Oops! thank you so much Dan, it worked as a charm. I was fooled into leaving this header in because I tried the exact same request setup using one of these free api endpoints instead of fusionauth api and it worked with the content-type included. Thanks again

    • danD

      Changing the fusionauth logging format

      Q&A
      • logging json logback • • dan
      2
      0
      Votes
      2
      Posts
      2.6k
      Views

      danD

      There's not really a supported way to modify the FusionAuth logging format.

      In theory you could do it manually but dropping in your own version of logback.xml and adding the necessary jars to the classpath.

      Here is an example of JSON with logback. https://github.com/larose/logback-json-example

      I think you’d have to add in the JSON logback jar since we do not ship with it.