You are not logged in.
Pages: 1
Hi everybody, how are you?
I'm facing a difficult with GLPI API, I'm using it for the first time.
I have enabled API on Setup -> General -> API (and enabled the login with external app token)
Create an API client with my source IP address and generate the app_token (the user is enabled)
Create an user in GLPI and generate the personal token and API token
I've checked the Setup -> General -> System and all plugins and php requirements are ok
My GLPI version is 10.0.5
Linux version Ubuntu LTS 22.04
Web Server Nginx
My GLPI installation in on URL root ex: https://my-glpiserver.com.br
My API URL is https://my-glpiserver.com.br/apirest.php
My access string is:
curl -X GET -H 'Content-Type: application/json' -H "Authorization: user_token <personaltoken>" -H "App-Token: app_token-generated on api user" 'https://my-glpiserver.com.br/apirest.php/initSession'
But testing it on curl or postman always return the full GLPI login page and never an authorization success or error
By the way, if I a access the API URL without any parameter ir returns the API documentation normally.
I really don't know what else I could look for, so if anyone have any tip about what is wrong or what I should verify I will be very appreciated!
Offline
Check this thread, may help: https://forum.glpi-project.org/viewtopic.php?id=209099
Offline
I've read the topic that you suggested but I think it isn't suitable for me, because my problem is not an authentication error, my problem is that API didn't respond as it should.
It seems that the normal login page returns in place of the API. I think it could be some misconfiguration in nginx because I've tested in another server with same Linux and Ngin'x configuration and the problem repeats.
I will try to setup a Linux server with apache to test it!
Offline
Pages: 1