[#438] Unable to access API

Migrated from Redmine #438 | Author: Atul Agarwal
Status: Rejected | Priority: Immediate, there is BUG! | Created: 2019-11-06


I am not able to access API for my account.

Following is the curl request for the same:-

curl -X POST
https://user-api.fcg-in.enterprisebookings.com/admin
-H ‘Accept: /
-H ‘Accept-Encoding: gzip, deflate’
-H ‘Cache-Control: no-cache’
-H ‘Connection: keep-alive’
-H ‘Content-Length: 106’
-H ‘Content-Type: application/json’
-H ‘Host: user-api.fcg-in.enterprisebookings.com
-H ‘Postman-Token: 4ec740b1-9990-4e1d-ac37-dbf218b7c112,f58d7051-1bc2-41b4-a93b-7bab958e607b’
-H ‘User-Agent: PostmanRuntime/7.18.0’
-H ‘X-Company-Login: olxin’
-H ‘X-Token: 084e31eb68dca4963a70f2d080bbb5227fc3ee7c87a026d88386fdcb1e962808’
-H ‘cache-control: no-cache’
-d ‘{“jsonrpc”:“2.0”,“method”:“getWorkDaysInfo”,“params”:[“2019-06-06 12:00:00”,“2019-07-06 12:00:00”],“id”:0}’

got following response:-

{
“error”: {
“code”: -32600,
“message”: “Access denied”,
“data”: null
},
“id”: “0”,
“jsonrpc”: “2.0”
}

Dmytro Bondarev wrote:

You have to use X-User-Token instead of token for admin API.