In our application we are using the PHP SDK of Prismic and we use Laravel as our PHP framework. Lately we have been getting some errors when there are updates within the Prismic CMS.
The following error is what we receive from our error reporting tool:
Client error: `GET https://<OUR_HOST>.cdn.prismic.io/api/v1/documents/search?page=1&pageSize=100&access_token=<OUR_ACCESS_TOKEN>` resulted in a `403 Forbidden` response: {"error":"Access to this Ref requires an access token","oauth_initiate":"https://<OUR_HOST>.cdn.prismic.io/auth"," (truncated...)
This only seems to be happening when we are making changes in the CMS. I tried looking up this issue on the forums here but couldn't find anything that looks similar yet. Anyone that may be able to assist?
Welcome to the Prismic forum and thanks for posting this question to us.
Whenever you do some changes in the Prismic documents, you need to save and publish the documents and it changes the master ref value. You need to put the new master ref.
You can find the master ref if you visit your projects API browser at:
The master ref is something we do not set, the webhook calls a cache:clear on our website and the Prismic API should retrieve a new master ref. The weird thing is that this always used to work but in the last weeks it suddenly stopped working and is showing this issue sporadically, which makes it hard to reproduce.
FYI, we use the v1 API and use the laravel SDK package.