Create and get API token using the REST API itself

General discussion of Mantis.

Moderators: Contributor, Developer

Post Reply
iruiz
Posts: 1
Joined: Aug 11, 2018 6:55 am

Create and get API token using the REST API itself

Post by iruiz » Aug 11, 2018 7:01 am

Hello,

I got a client here who wants to communicate his system with a bug tracker. So I thought that MantisBT using the REST Api would be the solution.

The thing is that he wants to evade at all the BT interface, and here it comes the problem. When creating a new user, I need to automatically create the API token for this user. And in addition, I would need to retrieve that token using username and password.

I was already implementing this solution hacking the MantisBT code but first I decided to come here to ask if you'd know a better solution. Because this is not supported in the REST API, is it?

Thank you and best regards,
Ignacio

atrol
Site Admin
Posts: 7305
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Create and get API token using the REST API itself

Post by atrol » Aug 16, 2018 7:59 am

iruiz wrote:
Aug 11, 2018 7:01 am
Because this is not supported in the REST API, is it?
It isn't.
IMO implementing it would introduce a security weakness.
That's why the token is also not displayed in UI on page "My Account" > "API Tokens"
Please use Search before posting and read the Manual

Post Reply