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

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
IuriyLb
Posts: 11
Joined: Dec 25, 2019 2:52 pm

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

Post 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?

mpa
Posts: 21
Joined: Jan 15, 2008 7:34 am

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

Post 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

Post Reply