Can someone please guide me step-by-step on how to properly configure and use the REST API in SuiteCRM 8.8?

I’ve successfully set up SuiteCRM (version 8.8) and it’s working fine through the browser. Now I want to access SuiteCRM data using the REST API (v8), but I’m not able to get it working.

I’ve read that proper setup is needed using Composer, environment configs, and OAuth2, but I’m a bit stuck. Also, when I try running composer install, it sometimes asks for GitHub credentials.

Can someone please guide me step-by-step on how to properly configure and use the REST API in SuiteCRM 8.8?

Thanks in advance!

Hello Bhupendra,

it sounds as if you’re on the right track.
Sometimes you’d need to add your github token / credentials in order to retrieve packages - you can just follow the steps the composer / CLI asked you in this case.

I’ve got a step by step guide here:

that might help to see you through.

Hello

I am facing the same issue. I have created an OAuth client but It didn’t give me the secret number. I made it directly in the MariaDB.

I did everything like the documentation suggest. I have created the public.key and orivate.key. I have placed the commands for permission chmod, chonw…

When I test with commands POST curl -X … The server connection reply me HTTP 200 ok but the erro 67 is presented. Like the suitecrm didn’t find the keys.

I tested several times the keys, as well I removed then and generate new ones. Also tested the database and checked the iD and secret number. ALL ok.

Also, I checked ApiConfig.php end config.php. I dont know where I can look for the erro anymore.

If someone can help I would be Grateful.

Regards
Clovis Carvalho

Hello Clovis,

best not do do anything in the DB.
There could be relationships required that needs creating or similar.
Try to have a clean server setup and stay inside the UI - then it usually works just fine.

Can you double check the location of the keys?

Again here - no need to check any code / db or similar.
As you can see in my video, it’s just a few steps on the command line, then the UI and it works.
If it doesn’t: How does your server look like? Maybe you’re missing some PHP modules or similar?
Double check with the docs:

Hello BastianHammer

How are you? Thank you very much for your support.

I tried to do like your recommendations. I turn back the default configurations in ApiConfig.php. Note that if I place the complete location of the private and public keys the server have connection HTTP 200 but I create the error 67.

However in default configuration I checked everything and I face the 404 error yet. I find out more information and it seems the command suitecrm:oauth2:client:create` doesn’t exist,

I downloaded the installer from SuiteCRM official website. It seems incomplete. Do you agree. Are there any documentation that I can look for the set points for the proper functionality?

The requirements I have checked all.

Thanks and best regards.
Clovis

Hello Clovis,

tricky situation.

So what I usually try is:

Often, if I have customers with “special” server setups like visual hosting panels, docker, shared hosting etc. this is where the difficulties come in.

If you have a vanilla LAMP setup, try to retrace your steps.
Maybe you’ve got some permission issues or have executed a command from the wrong folder or similar.

If you have one of those “special” server setups, start there.

SuiteCRM isn’t as easy as WordPress - but with a very standard LAMP setup, I’ve never had any significant issues.

If you want to, you can list out your environment and config details here - maybe someone will be able to contribute an idea.

1 Like

Hello BastianHammer

Thank you very much again!

It is done. I spent a couple of days to find out the problem. Your guide made me confident to make sure about what I should do. It was the ssl certificates for https, I changed that and it worked properly.

Thank you again.
Regards
Clovis Carvalho

2 Likes