# Hide Authorization token in newman HTML reports

**URL:** <https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732>\
**Category:** Help Hub\
**Tags:** authentication\
**Created:** [November 1, 2019, 7:05am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732 "2019-11-01T07:05:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajyy](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajyy](https://community.postman.com/u/rajyy)\
**Post date:** [November 1, 2019, 7:05am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732/1 "2019-11-01T07:05:25Z")

</div>

Hi Guys,

Please help me in hiding or disabling Oauth token on html report.

Thanks,  
Rajesh

 ![36%20PM](https://us1.discourse-cdn.com/getpostman/original/3X/0/1/0179f8340139d719060200515c9a2f92473a7b7c.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 1, 2019, 7:15am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732/2 "2019-11-01T07:15:43Z")

</div>

Hey @rajyy

Welcome to the community! 🙂

In the latest version, you should be able to run this from the CLI with the Newman run command

`--reporter-htmlextra-skipHeaders Authorization`

---

<div class="post-metadata">

**Author:** ![rajyy](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajyy](https://community.postman.com/u/rajyy)\
**Post date:** [November 1, 2019, 9:25am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732/3 "2019-11-01T09:25:52Z")

</div>

Hi @danny-dainton,

Thank you so much for the quick response. I have used `skipHeaders` but still no use. I’m getting the `Authorization` token on my report all the time. I’ll share you the command and piece of js script which I used. Please take a look at it.

**From CLI:**

`newman run collection.json -e environment.json -g globals.json -r htmlextra --reporter-htmlextra-skipHeaders Authorization`

**Script - 1:**

```
const newman = require('newman');

newman.run({
    collection: require('./collection.json'), 
    environment: require('./environment.json'),
    globals: require('./globals.json'),
    reporters: 'htmlextra',
    reporter: {
        htmlextra: {
            export: '' ,
             skipHeaders: ['Authorization']
        }
    }  

```

**Script - 2:**

```
const newman = require('newman');

newman.run({
    collection: require('./collection.json'),
    environment: require('./environment.json'),
    globals: require('./globals.json'),
    reporters: 'htmlextra',
    reporter: {
        htmlextra: { 
            export: '',
             skipSensitiveData: true
        }
    }
```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 1, 2019, 10:42am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732/4 "2019-11-01T10:42:05Z")

</div>

Which version of the reporter are you using?

These CLI flags only recently came into the reporter on the `1.8.9` version. If you’re running an older version of the app, these options won’t change anything in the report.

From the CLI you could use `npm i -g newman-reporter-htmlextra` or use `npm i -S newman-reporter-htmlextra` in the project dir, where you created the JS Script.

These are two examples that you could use to see this working.

This is excluding the `Authorization` Header:

`newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv --folder 'Authentication Methods' -r htmlextra --reporter-htmlextra-skipHeaders Authorization`

This is excluding all `Request/Response Headers` and `Request/Response Body` data:

`newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r htmlextra --reporter-htmlextra-skipSensitiveData`

---

<div class="post-metadata">

**Author:** ![rajyy](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajyy](https://community.postman.com/u/rajyy)\
**Post date:** [November 4, 2019, 6:32am UTC](https://community.postman.com/t/hide-authorization-token-in-newman-html-reports/8732/5 "2019-11-04T06:32:54Z")

</div>

Hi @danny-dainton,

Thank you so much for your support. It worked after updating newman

Cheers!!!

Regards,  
Rajesh Kumar
