Skip to main content

Setting API Token

The API token used by the PRCI can be set in multiple ways depending on your use-case.

For all of these methods, let's assume we have a PRCI element exposed as follows:

<bldn-priv-request id='prci'></bldn-priv-request>
<script src="" type="module"></script>

Via Attribute

In HTML Template

When using Lit templates or a templating language such as JSX.


<bldn-priv-request id='prci' api-token=${token}></bldn-priv-request>


<bldn-priv-request id='prci' api-token={token}></bldn-priv-request>

In Javascript

See the authentication step of the intro tutorial for a full example of this method.

function submit() {
.then(token => {
document.getElementById('prci').setAttribute('api-token', `${token}`)