403 forbidden error on postman api call

I retrieved client id and client secret from the sqlite3 clients table and made a get request to
http://localhost:8080/ghost/api/v0.1/posts/?client_id=ghost-frontend&client_secret=<client_secret>
but the result status was 403 with the following message:

{
    "errors": [
        {
            "message": "Please Sign In",
            "errorType": "NoPermissionError"
        }
    ]
}

I’m running ghost through docker and I do not have “Make this site private” checked off in the admin settings.

Any help is very much appreciated :]

@aleksanderbodurri do you have the “Public API” turned on in the Labs screen of your admin?

FYI, the old v0.1 “Public API” is deprecated, you’ll be better off using the v2 Content API.

I can’t see Public Api anywhere in my labs section of admin. I’ll look into using v2.

If you’ve never enabled it before and are on Ghost 2.10.2 or later then it won’t be shown as it’s deprecated. We should definitely look at improving that error message though!

Ahh that makes sense. I’ll give the v2 api a shot. I really appreciate the quick replies, have a great day. :slight_smile:

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