Public API for Master

Hi,

What is the difference between the Private API vs the Public API for Master ? Seems like both require a secret key to access API ? Thanks.

Hello,

Thanks for posting to us.

There is a difference between Private Api and public API. If you set your API as private, you need an access token for any request. And if you set API as public, you only need REF to access the latest content and preview the content planned to be published later or in the release. This is automatically handled when seeing the content in the API browser.

Recommendation: We recommend using our development kit for this.

Let me know if you have any other doubt.

Thanks,
Priyanka

I set my repo to Public API with Mater Ref. I also use the PHP development kit. However, I've been using the access token to instantiate the API - $api = Api::get($prismicURL, $prismicToken);
And this has been working.
So if I set the repo to Private API, then my code should still work as is ? Thanks.

Yes, It will work as expected if you set your repo from public to private.

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