# How to pass API token in header in Webviewer

**URL:** <https://pdfjs.community/t/how-to-pass-api-token-in-header-in-webviewer/2233>\
**Category:** Technical Support\
**Created:** [December 12, 2022, 5:36pm UTC](https://pdfjs.community/t/how-to-pass-api-token-in-header-in-webviewer/2233 "2022-12-12T17:36:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yavula](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yavula](https://pdfjs.community/u/yavula)\
**Post date:** [December 12, 2022, 5:36pm UTC](https://pdfjs.community/t/how-to-pass-api-token-in-header-in-webviewer/2233/1 "2022-12-12T17:36:55Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
8.7.0

**Detailed description of issue**  
How to pass API token in header using webviewer

**Expected behaviour**  
{Provide a screenshot or description of the expected behaviour}

**Does your issue happen with every document, or just one?**  
API token need to pass in header

**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
Sample code to render PDF:

WebViewer({  
path:this.globals.downloadURL+‘/c/dam/r/ctp/site\_assets/wv-resources/lib’,  
licenseKey: ‘xxxxxxx’,  
initialDoc: URL,  
disabledElements: [  
‘panToolButton’,  
‘selectToolButton’,  
‘toggleNotesButton’,  
‘miscToolGroupButton’,  
‘stickyToolButton’,  
‘freeTextToolButton’,  
‘eraserToolButton’,  
‘shapeToolGroupButton’,  
‘textToolGroupButton’,  
‘freeHandToolGroupButton’  
],  
disableFeatures: [  
‘Copy’  
]  
}, this.viewer.nativeElement).then(instance =\> {  
//document  
})

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [December 12, 2022, 10:25pm UTC](https://pdfjs.community/t/how-to-pass-api-token-in-header-in-webviewer/2233/3 "2022-12-12T22:25:37Z")

</div>

Hi there,

Thank you for contacting pdf.js express forums,

Please follow this guide on setting headers:

> **[Forwarding headers | Documentation](https://pdfjs.express/documentation/utils/headers)**

Best regards,  
Kevin Kim
