SimplyBook.me
Not logged in
English
Log in
Search
Navigation
Help Center
Getting started
Booking website
Time settings
Prices and purchases
Custom Features
Calendar and bookings
Tips for specific businesses
Integration
For developers
Video tutorials
Tools
Special pages
Printable version
Refresh page
Changes
Namespaces
Page
Discussion
Views
View
View source
History
Actions
From SimplyBook.me
← Older edit
Newer edit →
User API guide
(view source)
Revision as of 19:50, 15 December 2016
5 bytes added
,
7 years ago
no edit summary
Line 27:
Line 27:
</code><br>
</code><br>
Initialization JSON-RPC-client.<br>
Initialization JSON-RPC-client.<br>
−
<
code
>this.client = new JSONRpcClient({<br>
+
<
nowiki
>this.client = new JSONRpcClient({<br>
'url': 'http://user-api.simplybook.me',<br>
'url': 'http://user-api.simplybook.me',<br>
'headers': {<br>
'headers': {<br>
Line 34:
Line 34:
},<br>
},<br>
'onerror': function (error) {}<br>
'onerror': function (error) {}<br>
−
});</
code
><br>
+
});</
nowiki
><br>
'''Authorization from server side code'''
'''Authorization from server side code'''
Getting the token-key.
Getting the token-key.
<code>$loginClient = new JsonRpcClient('http://user-api.simplybook.me' . '/login/');
<code>$loginClient = new JsonRpcClient('http://user-api.simplybook.me' . '/login/');
$token = $loginClient->getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);</code>
$token = $loginClient->getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);</code>
Admin
Bureaucrats
,
Administrators
9,514
edits