Internal Server Error while retrieving access token in V8 API

Hi Team,

  1. I recently installed SuiteCRM Certified by Bitnami from AWS Marketplace. (https://aws.amazon.com/marketplace/pp/Bitnami-SuiteCRM-Certified-by-Bitnami/B00NN8WPN6)

  2. Followed steps mentioned in the below link for V8 API. There is no error during installation or configuration.

  1. Trying to get access token with the below API via postman tool. It is throwing 500 - Internal Server Error and I didn’t see any errors in suitecrm.log file.
    url - http://ec2-3-xx-xxx-xxx.us-east-2.compute.amazonaws.com/Api/access_token
    grant_type - client_credentials
    client_id - myclientid
    client_secret - mysecret
    schema - suitecrmv8

  2. Let me know if I am missing anything.

Thanks.

Is this 7.11.12?

Bitnami has some peculiarities, there might be something different there…

A 500 error looks like a server crash, so it’s possibly a PHP Fatal. You would find this in your web server PHP log, not in suitecrm.log

Check your php.ini for the error_log entry to find out where it is

1 Like

In checking your error_log entry, you may see an error similar to the following:

 Uncaught LogicException: Key path "file:///somepath/Api/V8/OAuth2/private.key" does not exist or is not readable in /somepath/htdocs/vendor/league/oauth2-server/src/CryptKey.php:45

Your websever may not be running as the same user defined in the documentation:
sudo chown www-data:www-data p*.key

In my case the webserver was running as a group:user other than www-data:www-data.

For example, if you are running Apache on Linux, you can find out the user it is running on by referencing this link: Finding out what user Apache is running as.

As soon as I found out the right group and user and gave that user appropriate permission to the file, I no longer got the Internal Server Error.