You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-11-06 21:07:07

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

authorisation by token

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

Board footer

Powered by FluxBB