Custom Types API call leads to 403

Hi everyone,

I'm trying to test the Custom Types API in Postman and for some reason, I receive a 403 error ("message": "User is not authorized to access this resource with an explicit deny").

Here's what my request look like in cURL:

curl --location --request GET 'https://customtypes.prismic.io/customtypes' \
--header 'repository: {the name of my CMS}' \
--header 'Authorization: Bearer {my Bearer token}'

Could you please let me know what I might be doing wrong?

Thank you!

Hi @sigalizer,

Thanks for reaching out.
I've taken a look at the request you are doing, and I don't see an issue with it. And to be able to reproduce the issue, I would need your repository name (you can share it in a private message if necessary).

Looking forward to your reply,
Fares

Hi Fares,

Thank you for the quick response. Since it's a public API mostly, I have no issue with giving you the repo name: it's hope-cms

So that line in cURL looks like this:

--header 'repository: hope-cms' \

Thank you!

1 Like

Hi Fares,

Do you have any idea why I receive a 403 on this request?

Thank you!

Hey @sigalizer, Fares is out of the office, so I'll be helping you today.

Could you send me the bearer token so I can run a test on my end?
403 errors usually happen when there's an error on the request setup. We can try and figure it out together :ok_hand:

Hi Team,

If you're getting a 403 it's an authentication error and you are most likely using the Content access token and not the Custom Types bearer token. You can find this Custom Types token information in the 'API & Security' section of your repository settings. Click the 'Custom Types API' tab, here you will be able to generate a new access token, you can use multiple bearer access tokens for different applications, this is recommended.

Thanks.

2 Likes

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