The REST API test fails

 

There are a number of reasons why the REST API test might fail.

It may well fail with a 500 error. To determine the cause you will need to check your PHP error log.

 

A number of settings you can try are as follows.

In your .htaccess in the root of your CMS's installation, try setting as the following :

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/jomres/api/

 

If you are calling your server through Postman or CURL on the command line and you're seeing the message "'No authentication is provided. Bearer missing from headers?" then it's possible that you will need to modify Apache's configuration a little. To resolve this on my own server I logged into WHM as admin, Service configuration > apache configuration > Include editor and created a Pre Virtual Host include with the following :

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

and then restarted apache.