Authorization (401) Problem



  • When trying to use the API call (post) with node.js/request, I get a response with:

    statusCode: 401 (message "Unauthorized")

    Now.. I have authorization setup on the server config with a secret key, (done with setup) and I have tried sending the request with a header containing both "auth" accompanied by a JSON block with "username" and "password" as well as "Authorization" and "authorization" as a base64 encoded("username:password").

    Attempting both with external IP and running on local host (@localhost) results in the same thing.

    Documentation does not seem clear on how the header should actually be added or how the base64 authorization differs from the "auth" object with clear text authentication details..

    When given just the admin account, password, and "secret" in server configuration for basic authentication.. what is the actual request look like? All my attempts claim that the user requested was null..

    Any help would be appreciated..

    (Side note, unable to login to the forum via Linux (Debian 9.0) on both Chromium and Firefox as no login form is displayed.. only options seen for some reason are the social media links. As such I'm logging in via iPhone as Safari seems capable of loading it with the mobile version..)



  • Please share how does your API call look like.
    Perhaps try it in the postman or another tool like that.
    It is typically the easiest way to troubleshoot

    It should look like this
    0_1577721024370_upload-bd4937cf-d2d7-4a9a-9eeb-988cfa54fad8


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.