Migrated from Redmine #616 | Author: babagogo babagogo
Status: Closed | Priority: Normal | Created: 2020-11-30
I have been google it for a few days and I see “MANY” people reported the same issue but none of them reply how they solved it!
this is just a trial account, I will make sure that APIs worked before using the real one.
<?php /* settings in config.php define('SIMPLYBOOK_API_KEY', 'e9a0c490e772f3caf2cf62f2cf0e3cd7843ceea9f75a78f68ab04f9dc7f9abc5'); define('SIMPLYBOOK_API_SECRET', '70e7f8b8960d1e54e4056e63dd924300d5f3720cf6da704fbf0c6d6966ab418f'); define('SIMPLYBOOK_COMPANY_LOGIN', '99dac'); */ $loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/'); $token = $loginClient->getToken(SIMPLYBOOK_COMPANY_LOGIN, SIMPLYBOOK_API_KEY); print_r($token); $client = new JsonRpcClient('https://user-api.simplybook.me' . '/admin/', array( 'headers' => array( 'X-Company-Login: ' . SIMPLYBOOK_COMPANY_LOGIN, 'X-User-Token: ' . $token ) )); $services = $client->getUnitList(); print_r($services); ?>I get the token correctly, but then get an Access Denied for the rest.
and I really think SimplyBook should consider rewrite the documents of API! or maybe put more demo codes on!
with SOOOooo many users reporting this same issue, why not make your documents better?