# Access token with Nuxt.js

**URL:** <https://community.prismic.io/t/access-token-with-nuxt-js/306>\
**Category:** Developing with Prismic\
**Tags:** nuxtjs\
**Created:** [April 28, 2020, 9:43am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306 "2020-04-28T09:43:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremy.benzakein](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jeremy.benzakein/32/2145_2.png) [@jeremy.benzakein](https://community.prismic.io/u/jeremy.benzakein)\
**Post date:** [April 28, 2020, 9:43am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/1 "2020-04-28T09:43:46Z")

</div>

Hi,

This is an awkward question.

I just changed my Prismic repository visibility to private and now I cannot seem to find where to define the access token in my Nuxt app.

I have looked at everything in the documentation but could not find the solution. Does someone know how this value needs to be set?

Your help will be appreciated 🙂

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [April 28, 2020, 9:46am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/2 "2020-04-28T09:46:52Z")

</div>

Hi @jeremy.benzakein,  
Now you can set your access token since the version 1.2.0 but you need to be careful with this, your access token will bleed in the build of Nuxt.  
You just need to be aware of it but that works.  
Hope it helps 😉

---

<div class="post-metadata">

**Author:** ![jeremy.benzakein](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jeremy.benzakein/32/2145_2.png) [@jeremy.benzakein](https://community.prismic.io/u/jeremy.benzakein)\
**Post date:** [April 28, 2020, 9:55am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/4 "2020-04-28T09:55:25Z")

</div>

@arnaud

Thanks for your quick reply 🙂

I figured there would be a way to set the access token but I have not found it yet (maybe my initial question wasn’t clear).

How do you set the access token ? Or where can I start looking in order to find that ?

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [April 28, 2020, 9:56am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/5 "2020-04-28T09:56:11Z")

</div>

I updated the readme here: [https://github.com/nuxt-community/prismic-module#quick-start](https://github.com/nuxt-community/prismic-module#quick-start)

---

<div class="post-metadata">

**Author:** ![jeremy.benzakein](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jeremy.benzakein/32/2145_2.png) [@jeremy.benzakein](https://community.prismic.io/u/jeremy.benzakein)\
**Post date:** [April 28, 2020, 10:02am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/6 "2020-04-28T10:02:03Z")

</div>

@alws

Thanks a lot ! I knew i was missing something obvious 😅

---

<div class="post-metadata">

**Author:** ![alws](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/alws/32/160_2.png) [@alws](https://community.prismic.io/u/alws)\
**Post date:** [April 28, 2020, 10:03am UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/7 "2020-04-28T10:03:57Z")

</div>

Ahah don’t worry, It’s there for only a few days because of the security risk it represents that’s why Atinux judged that it shouldn’t be here.  
Since I added a new feature in there, the `routes` thingy, then I allowed to provide any apiOptions to the Prismic client.  
So now it’s up to you 🙂

---

<div class="post-metadata">

**Author:** ![jeremy.benzakein](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jeremy.benzakein/32/2145_2.png) [@jeremy.benzakein](https://community.prismic.io/u/jeremy.benzakein)\
**Post date:** [June 19, 2020, 1:58pm UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/8 "2020-06-19T13:58:39Z")

</div>

Hi @alws,

I just noticed that the access token line is still present in [README](https://github.com/nuxt-community/prismic-module#quick-start) and I thought you might want to remove it since you said you would 🙂

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 22, 2020, 1:45pm UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/9 "2020-06-22T13:45:33Z")

</div>

Hey Jeremy,

I think what Arnaud meant was that this is still possible, but not recommended. So I did a PR to change the READme to include a warning that using this option will cause the accessToken to bleed in to the build.

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [September 15, 2020, 4:46pm UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/10 "2020-09-15T16:46:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:35pm UTC](https://community.prismic.io/t/access-token-with-nuxt-js/306/11 "2021-12-09T17:35:08Z")

</div>


