REST Api Authentication on Axelor 8.0.1

Hello,

I’ve just upgraded my axelor version from 7.x to 8.0.1.
I used to call axelor API to retrieve and push data and the authentication worked well using a request simular to the following curl request :

curl --location --request POST ‹ https:///axelor/login.jsp › --header ‹ Content-Type: application/json › --header ‹ Accept: application/json › --data-raw ‹ {
« username »: « xxxxx »,
« password »: « xxxxx »
} ›

But now, on a fresh 8.0.1 version, I always get a 401 error with an admin user (I can connect with this user using the UI).

Has something changed about REST API authentication on this new version ?
A module to activate ? A new role to assign the « api » user ? A new way of authentication ?

Thank you very much.

Fabrice

Hello

instead of this url try with https:///axelor

Hope this will be helpful

Thank you.

Hello,

It doesn’t work.
With this URL I have a return 200 but with HTML body and the token returned in Cookie does not work (I still have a 401 error trying to call an endpoint with this token).

There is no specific right to set to the user to be able able to call the API?

Thx

PS : There was a display problem on my previous question. My URL was https://myserver/axelor-8/login.jsp and not just https://axelor/login.jsp. So I tried with https://myserver/axelor-8

Hello

Try https://myserver/axelor-8/callback

Thank you

1 « J'aime »

It works. Thx!

But the relative URL /callback is quite weird, no ?
Does it aim at changing in the future ?

Thank you

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.