[#50] Access denied - admin - getAvailableTimeIntervals

Migrated from Redmine #50 | Author: Mateusz Przybylek (DIABDIS)
Status: Rejected | Priority: Normal | Created: 2017-10-03


We would like to try out admin API method

But every time get Access denied

curl -X POST \
  http://user-api.simplybook.it/admin \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 870ed157-eaa3-27b6-96bd-436c250ea552' \
  -H 'x-company-login: bytes' \
  -H 'x-token: 741baaf384808312a9d34a268a6bebd8f687538fcb9a56b7f3ad48c6e8d3d024' \
  -d '{
	"jsonrpc": "2.0",
	"method": "getAvailableTimeIntervals",
	"params": 
	[
	],
	"id": 11
}'

Mateusz Przybylek (DIABDIS) wrote:

Response:

{
    "error": {
        "code": -32600,
        "message": "Access denied",
        "data": null
    },
    "id": "11",
    "jsonrpc": "2.0"
}

Dmytro Bondarev wrote:

  1. You need to get token via [[Authentication - Authentication - SimplyBook.me]]
  2. pass x-user-token instead of x-token