I'm using the access_token which I created in the Prismic UI (under Permanent access tokens)
The first request to get the master ref works successfully, however when I do the search request I receive an error showing this:
{
"error": "Access to this Ref requires an access token",
"oauth_initiate": "https://***.cdn.prismic.io/auth",
"oauth_token": "https://***.cdn.prismic.io/auth/token"
}
Can I get some support to know what I'm doing incorrectly?
The API access for this repository is currently: "Public API for Master only - Require an access token to preview future releases".
Just to be clear I want to add the auth_token incase the Prismic API access becomes private.
After looking at your code, it seems the assignment to access_token is not correct. Could you please try with access_token: prismicToken instead of access_token= prismicToken.