[#359] Connected but can't access data - How?

Migrated from Redmine #359 | Author: Shane Holmes
Status: New | Priority: Normal | Created: 2019-03-14


This code below works - up to the last line:

var loginClient = new JSONRpcClient({
	'url': 'https://user-api.simplybook.me' + '/login',
	'onerror': function (error) {},
});

which returns the following:

{“options”:{“url”:“https://user-api.simplybook.me/login","headers”:{}}}

var token = loginClient.getToken('TheADKX', '88e24ae6c5cb30d9205ffc05b490daef8ddd189fefc8....................');

which returns:

“26bdaa7483a206b8432e761d04ae3b15362375e9d692…”

var client = new JSONRpcClient({
	'url': '//user-api.simplybook.me',
	'headers': {
		'X-Company-Login': 'TheADKX',
		'X-Token': token
	},
	'onerror': function (error) {
		alert(error);
	}
});

which returns:

{“options”:{“url”:“//user-api.simplybook.me”,“headers”:{“X-Company-Login”:“TheADKX”,“X-Token”:“58f27f6aacba4887ed2307a45c8d7251be7c66c4727a…”}}}

var services = client.getEventList();

which returns nothing, no json, no error, no nothing. If i put a console debug line after it, it never executes the console line

Any help would be appreciative

thanks

shane

Redmine Admin wrote:

Please follow API documentation | SimplyBook.me Online Scheduling
you can provide your credentials to API explorer and check what is called and how.