Page 1 of 1

Rest API does not work - code 200, but the authorization page in the response

Posted: 26 Dec 2019, 11:31
by IuriyLb
1) I installed Mantis, version 2.20.
Debian OS 9.4.
Mantis is deployed through the VestaCP panel.

2) I added a parameter that allows access to the REST in the config /config/config_inc.php :

Code: Select all

$g_webservice_rest_enabled = ON;
3) I generated a token under the admin in BT

4) I added several APIs In Postman. One of them is getting a list of all projects.

5) I added a token to the APIs headers, and added my host to the URL

6) I send a request, get the code 200, but this is not json, this is the html of the authorization page.

The bugtracker is working on https.

What's wrong? Why does not it work?

I have an assumption that maybe this is somehow due to the fact that VestaCP initially configures sites through nginx. And what happens with Apache I don’t really understand. How to check or run this?

Re: Rest API does not work - code 200, but the authorization page in the response

Posted: 16 Apr 2020, 12:11
by mpa
I have the same problem.

I have tried everything on this page, but with no succes.
viewtopic.php?f=3&t=26155

Any help is really appreciated.

Running:
Mantis 2.22
Ubuntu 18.04 with
Apache 2.4
PHP 7.2 and Webmin