Cannot authenticate - authorization header

Integration questions/issues
Post Reply
w3bigdata
Posts: 5
Joined: Mon Aug 27, 2018 12:51 pm

Cannot authenticate - authorization header

Post by w3bigdata » Sat Oct 19, 2019 1:45 pm

Hello,

this command works fine to get the token with curl (linux Debian 9) on the hosted Only Office community server (Docker edition v9.5.4.553)

Code: Select all

curl --request POST --header "Content-Type: application/json" --data "{\"username\":\"<user>\",\"password\":\"<pass>\"}" "https://my.onlyoffice.tld/api/2.0/authentication.json"
I get the token in response (I have put some random character to alter it), it looks crypted to me...

Code: Select all

{"count":1,"status":0,"statusCode":201,"response":{"token":"cktU2NwugXXXXXXX5EMiFSRmfzKY+6N8zSi\/t7m0WDGXXXXmZkZt2On\/\/erEO1ZXOeDAcEcOWlEXXXXXPExWH9VRbx0\/p\/ee9LBE2t4XXXTubuQ=="
Next I'm doing a simple API call with the same token, following this explanation https://api.onlyoffice.com/portals/auth, just to test the API connection with the previously provided token...

Code: Select all

curl --request GET --header "Authorization:cktU2NwugXXXXXXX5EMiFSRmfzKY+6N8zSi\/t7m0WDGXXXXmZkZt2On\/\/erEO1ZXOeDAcEcOWlEXXXXXPExWH9VRbx0\/p\/ee9LBE2t4XXXTubuQ==" "https://my.onlyoffice.tld/api/2.0/people/@self.json"
And i get

Code: Select all

Unauthorized
Can you help me ?

Thanks !

Carl
Posts: 271
Joined: Thu Apr 12, 2018 10:00 am

Re: Cannot authenticate - authorization header

Post by Carl » Mon Oct 21, 2019 2:18 pm

Hello w3bigdata,

Please note that the current version of Community Server is 10.0.4. Please check this scenario on this version and let me know if the issue persists.

Post Reply