agent-js-postman icon indicating copy to clipboard operation
agent-js-postman copied to clipboard

Need to pass auth header and having issues

Open w100frt opened this issue 3 years ago • 1 comments

Hello - currently trying to use reportportal via CLI and I need a way to pass an auth header. I did not see headers as a specific option for newman and report portal so was attempting to use restClientConfig like this:

newman run {{myPostmanUrl}} --folder '$(area)' --reporter-htmlextra-darkTheme --reporter-htmlextra-logs --reporter-htmlextra-testPaging --reporter-htmlextra-omitHeaders --reporter-htmlextra-noSyntaxHighlighting --reporter-htmlextra-title {{myTitle}} -r htmlextra,testrail,@reportportal/agent-js-postman --timeout-script 4000000 -n 1 -e {{myPostmanEnv}}
--reporter-@reportportal/agent-js-postman-debug=true
--reporter-@reportportal/agent-js-postman-endpoint={{myReportPortalUrl}}
--reporter-@reportportal/agent-js-postman-token={{reportPortalToken}}
--reporter-@reportportal/agent-js-postman-launch={{myLaunchName}}
--reporter-@reportportal/agent-js-postman-project={{reportPortalProject}}
--reporter-@reportportal/agent-s-postman-description={{testDescription}}
--reporter-@reportportal/agent-js-postman-restClientConfig="{rejectUnauthorized:false,params: {access_token: 'XXXX'},headers: { Authorization: 'Basic XXXXX }}" \

When I try this I get a 401 from Report Portal but I know my credentials are correct. Any ideas?

w100frt avatar Jun 27 '22 19:06 w100frt

Hello @w100frt ! Could you describe your case in more detail? Why do you need to pass authentication headers? If the token is present, it should be sufficient to report the data.

AmsterGet avatar Oct 17 '23 22:10 AmsterGet