You are not logged in.
Pages: 1
Hello!
Can't authorise by token on telegram bot using apirest? How can I do this?
This doesnt work:
curl -X GET \
-H 'Content-Type: application/json' \
-H "Authorization: user_token q56hqkniwot8wxxxxxxxxxxxxxxxxxxxxxxx" \
-H "App-Token: f7g3csp8mgatgxxxxxxxxxxxxxxxxxx" \
'http://path/to/glpi/apirest.php/initSession'
public async login(login: string, password: string) {
return this._login(`Basic ${Base64.encode(`${login}:${password}`)}`)
}
public async loginWithToken(token: string) {
return this._login(`user_token ${token}"`)
}
Thanks
Last edited by repentandliveholy (2023-11-06 21:09:16)
Offline
Pages: 1