Create and get API token using the REST API itself

General discussion of Mantis.

Moderators: Developer, Contributor

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

Create and get API token using the REST API itself

Post by iruiz »

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: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post by atrol »

iruiz wrote: 11 Aug 2018, 12:01Because 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