system
October 9, 2022, 4:38am
1
Migrated from Redmine #941 | Author: MOZ ZOM
Status: New | Priority: High, I’m very impatient | Created: 2022-10-09
Hi,
I am trying to implement a feature to delete client.
There is a “Delete Client” in the API documentations
The document suggests it is possible to do with following method:
DELETE https://user-api-v2.simplybook.me/admin/clients/1000
Content-Type: application/json
X-Company-Login:
X-Token:
*
I am trying to do the same with Cluster API account:
*
DELETE https://user-api.simplybook.vip/admin/clients/852
Content-Type: application/json
X-Company-Login:
X-User-Token:
*
but then it returns {‘error’: {‘code’: -32600, ‘message’: ‘Invalid Request’, ‘data’: None}, ‘id’: None}
Is this API method exclusive to https://user-api-v2.simplybook.me/ ?
Perhaps I need to explicitly states the company login in url?
Thank you
system
October 9, 2022, 8:08am
2
system
October 11, 2022, 3:58am
3
MOZ ZOM wrote:
Dmitry Bondarev wrote:
Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url
I am using ClusterAPI to get company token.
On the api side, I am using JSON-RPC client.
I tried https://user-api-v2.simplybook.vip/admin/clients/{id}
But get 401, message=‘Unauthorized’, url=URL
Is there any documentation on v2?
system
October 11, 2022, 4:06am
4
MOZ ZOM wrote:
MOZ ZOM wrote:
Dmitry Bondarev wrote:
Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url
I am using ClusterAPI to get company token.
On the api side, I am using JSON-RPC client.
I tried https://user-api-v2.simplybook.vip/admin/clients/{id}
But get 401, message=‘Unauthorized’, url=URL
Is there any documentation on v2?
On the current documentation, it suggests that authentication requires
company
login
password
Does this mean I can no longer use the company token acquired via Cluster API to authenticate?
Do I need a separate mechanism to acquire a token?
system
October 11, 2022, 4:52am
5
MOZ ZOM wrote:
Dmitry Bondarev wrote:
Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url
I managed to get it working by add ‘X-Token’ to the header.
Realised that ‘X-User-Token’ and ‘X-Token’ are not interchangable
Thank you.