[#616] Access Denied on calling all APIs

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?

babagogo babagogo wrote:

the problem solved by changing the getToken to getUserToken and with my user login account / passwords
I had been trying it for two days and got access deny for the 2 whole days!

I still think that SimplyBook should really do some more with the Documents! and put more demo codes on!
with this simply and stupid(I mean myself) error can really scare the user away from using your service. really!