Unable to connect to REST API

Hey all, i’m new to working with the concrete API system and our team is trying to connect a PWA to a Concrete site to pull page data into the app.

I’ve been following the documentation and youtube video for connecting Postman to Concrete CMS and i’m able to connect and get a token using ‘Client Credentials’, however the result is a 404 not found page when try to GET mydomain/ccm/api/v1/system/info (scope: system:info:read)

When i switch to ‘Authorization Code’ I get the following error when requesting a token:

{“error”:“invalid_client”,“error_description”:“Client authentication failed”,“message”:“Client authentication failed”}

CMS: 9.2.2 / PHP: 8.2

Any help would be amazing. Been using Concrete for year, but API is something new to me.

Hello,

So I believe that video will need to be updated. The endpoint is actually different, it’s

/ccm/api/1.0

On any integration, you can check the “get interactive documentation” checkbox which will give you a way to verify what routes are there, and make sure they work before you try to use Postman.

Hope that helps!

Thanks for the reply @EvanCooper -
You are right- /v1/ doesn’t work. I updated to the following and can get a proper response instead of a 404 error: https://www.domain.whatever/ccm/api/1.0/files/1

I get the above error when using ‘client credentials’ and if i understand correctly, the ‘files’ scope requires oauth2 authorization. In Postman, when i try to get a new token using ‘authorization code’ and the Client ID/Secret keys i’m unable to connect and get any results from the GET request.

Is there any server-side configuration that needs to occur for API to work?
I’m stumped.

Hmm - when you do the “get interactive documentation” testing in the dashboard does it work as expected?

Yes, using the concrete interactive API documentation, and using only “authorization (OAuth2, authorizationCode)” i’m able to return a result for GET files [Preformatted text](https://www.domain.whatever/ccm/api/1.0/files/1)

Looks like the access was just a misconfiguration / lack of understanding on process on my part. I missed the Callback URL and scope.

Learning new things everyday haha.

1 Like

It’s definitely a lot to learn! Glad you could get it all sorted :+1: