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: docs.suitecrm.com/developer/api/version-...rt_calling_endpoints
In addition, I created an Oauth2 client on the admin site.
Then, I’m using Postman to get an access_token this way:
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:
- 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/group-training.crm.unipart.digital/httpdocs/vendor/slim/slim/Slim/App.php:621
#0 /var/www/vhosts/group-training.crm.unipart.digital/httpdocs/vendor/slim/slim/Slim/App.php(317): Slim\App->finalize(Object(Slim\Http\Response))
#1 /var/www/vhosts/group-training.crm.unipart.digital/httpdocs/Api/index.php(4): Slim\App->run()
thrown in /var/www/vhosts/group-training.crm.unipart.digital/httpdocs/vendor/slim/slim/Slim/App.php 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.
- 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