Hello,
i want to know how to use this token:
this command create token (jwt):
manage-api createtoken -r admin -u apiadmin
Auth-Token: b’eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ…’
valid 365 days
i create apiadmin:
pi-manage admin add apiadmin
but how to use it:
GET /user
Host: example.com
Accept: application/json
Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ…¨
but not works
when i use apiadmin with /auth i have a token but for 1 hour , i would like to have a authentication token for service account.
i thinked the token create with manage-api createtoken -r admin -u apiadmin could be used for that.
how to use this token?Auth-Token: b’eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ…’
Thanks for your help.
i have this message “Authentication failure. Error during decoding your token: Signature verification failed”"
i use authorization header and token without b’
like that
Accept: application/json
Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ…W2k4
GET /user/
any idea thanks for your help
Thanks,
i don’t understand.
I am logged with root account i launched:
-manage-api createtoken -r admin -u apiadmin
-pi-manage admin add apiadmin
i have:
Username: apiadmin
Realm: API
Role: admin
Validity: 365 days
Auth-Token: b’eyJ0eXAiOiJKV1QiLCJhbGciOiJI…k’
and logged with root i launch:
curl -s -H “Accept: application/json” -H “Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJI…k” -k -X GET https://mfa.domain.com/user/