Issue when accessing the API Browser

Hello all,

I can't access the API Browser since a moment now.
The only thing I have is a blank page with a JSON written:

{"type":"api_security_error","message":"Invalid access token","oauth_initiate":"https://ai-marketplace.prismic.io/auth","oauth_token":"https://ai-marketplace.prismic.io/auth/token"}

If someone have an idea, should be great :slight_smile:

Hi @goualch.kevin ,

This is really strange! :thinking:

Thanks for posting this bug, and welcome to the Prismic community!

I managed to reproduce the issue and get the exact same error as you. I've submitted a ticket with our dev team to look into this, and I'll let you know what they say.

Best,
Sam

Hey @goualch.kevin ,

It looks like the error is because the link in the settings is wrong. That link includes the segment .cdn, which directs your query to the main API — which for your repository is protected by authentication. If you remove the .cdn segment from the URL, you should get the API Browser. In your case, the URL should be:

https://ai-marketplace.prismic.io/api/v2

Let me know if that works for you, and in the meantime I'll work on fixing the link in the settings panel.

Sam

I successfully accessed the Api browser by using the URL to access a query. I wonder if it just missing the accesstoken in the URL :grin:

Adding the access token would grant access to the API, but it wouldn't get you the API browser. The API Browser is accessed by querying your endpoint without the CDN from a browser. The main API is accessed by querying your endpoint with the CDN.

I'm glad you've got it working! Let me know if you have any other questions :slight_smile:

Sam

Resolved issue: Invalid access token in api browser - #9 by Priyanka