Error 500 when using the API

Hi everyone,

I’m trying to use the SuiteCRM API but I’m getting an error with HTTP code 500.

I created a new instance on AWS EC2 using bitnami, It’s a clean installation with no data, just the admin user.
I followed all steps from this tutorial:

In addition, I created an Oauth2 client on the admin site.

Then, I’m using Postman to get an access_token this way:

POST https://<my_site>/Api/access_token
   "grant_type":  "client_credentials",
   "client_id": "<my_client_id>",
   "client_secret": "<my_client_secret>"

But I’m getting the error,
I don’t see any error on suitecrm.log.
Am I missing something?


you have set the POST URL for the API in POSTMAN
and in the Body, you are selecting application type as JSON and the type is RAW?

Error 500 is an internal server error. Assuming that this crm instance behaves correctly wrt normal web login and behaviour, I’m going to suggest 2 things:

  1. Is that you actually have this error in your apache error logs:

[21-Jul-2020 22:00:57 UTC] PHP Fatal error: Uncaught RuntimeException: Unexpected data in output buffer. Maybe you have characters before an opening <?php tag? in /var/www/vhosts/
Stack trace:
#0 /var/www/vhosts/ Slim\App->finalize(Object(Slim\Http\Response))
#1 /var/www/vhosts/ Slim\App->run()
#2 {main}
thrown in /var/www/vhosts/ on line 621

This almost certainly means that you have copied and pasted your config.php from the web installer, and left spaces/additional lines at the end of the config.php. Remove them and it will resolve the issue.

  1. That there are incorrect permissions on some of the files associated with this functionality. Again your apache logs will indicate that access to a file has been denied. Correct this and you should be good to go.

Assuming that the problem is neither of the above, then considering that you are running a clean install, then we may have to look at some operating system configuration. Under those circumstances, you’ll need to provide details of OS/Version/Web server being used etc, so that people here can provide a bit more guidance.

porque nadie pone codigo de ejemplos. ches egoistas mamones