# Can the permanent access token be used to fetch data from draft pages

**URL:** <https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625>\
**Category:** Developing with Prismic\
**Tags:** rest-api\
**Created:** [June 4, 2021, 4:45pm UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625 "2021-06-04T16:45:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan.parker](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/dan.parker/32/2232_2.png) [@dan.parker](https://community.prismic.io/u/dan.parker)\
**Post date:** [June 4, 2021, 4:45pm UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/1 "2021-06-04T16:45:51Z")

</div>

Hi there,  
If the permanent access token is exposed, do you know if someone can use it with the prismic rest api to access data from draft pages or is it only used to fetch data from published pages?  
Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 7, 2021, 12:02pm UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/3 "2021-06-07T12:02:34Z")

</div>

Hello @dan.parker

Thanks for reaching out to us.

You can only have data from the published pages in the Rest API from Prismic even though a permanent access token is exposed.

Let me know if you have any questions.

Thanks,  
Priyanka

---

<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 8, 2021, 10:06am UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/4 "2021-06-08T10:06:21Z")

</div>

Hey Dan,

The access token is different than the master ref, which dictates whether you get the latest content or not, you can learn more about the here:

> **[Introduction to the Prismic Content Query API](https://prismic.io/docs/technologies/introduction-to-the-content-query-api#prismic-api-ref)**
>
> Prismic provides an API query browser to retrieve your content as a JSON response. This section explains in more depth the API structure and main concepts.

If you want to get the ref for documents in a release, [which is a group of drafts](https://prismic.io/docs/core-concepts/draft-plan-and-schedule-content), you can find the ref for the releases in the API browser:

> **[The Rest API Browser](https://prismic.io/docs/technologies/the-rest-api-browser)**
>
> Every Prismic repository includes an API browser that will help you discover your API, test your queries, and display the JSON results.

If you're are just trying to preview draft content, then you should check out our previews feature here:

> **[Previews and the Prismic Toolbar with JavaScript](https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-javascript)**
>
> When working in the writing room, you can preview new content on your website without having to publish the document and use the Toolbar to edit your pages.

Let us know if you have any further questions.

Thanks.

---

<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 8, 2021, 10:06am UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/5 "2021-06-08T10:06:29Z")

</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:** [June 21, 2021, 6:44am UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/6 "2021-06-21T06:44:09Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<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, 3:42pm UTC](https://community.prismic.io/t/can-the-permanent-access-token-be-used-to-fetch-data-from-draft-pages/5625/7 "2021-12-09T15:42:54Z")

</div>


