No edit summary |
Marked this version for translation |
||
| Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
<!--T:1--> | |||
{{#seo: | {{#seo: | ||
|title=Authentication - SimplyBook.me | |title=Authentication - SimplyBook.me | ||
| Line 10: | Line 11: | ||
<translate> | <translate> | ||
== Methods == | == Methods == <!--T:2--> | ||
=== getServiceUrl === | === getServiceUrl === <!--T:3--> | ||
<!--T:4--> | |||
<code>getServiceUrl($companyLogin)</code> | <code>getServiceUrl($companyLogin)</code> | ||
<!--T:5--> | |||
Parameters: | Parameters: | ||
<!--T:6--> | |||
* '''$companyLogin''' String | * '''$companyLogin''' String | ||
<!--T:7--> | |||
Returns String. | Returns String. | ||
<!--T:8--> | |||
Returns API url for given company login | Returns API url for given company login | ||
| Line 27: | Line 33: | ||
---- | ---- | ||
<translate> | <translate> | ||
=== getApplicationToken === | === getApplicationToken === <!--T:9--> | ||
<!--T:10--> | |||
<code>getApplicationToken($applicationApiKey)</code> | <code>getApplicationToken($applicationApiKey)</code> | ||
<!--T:11--> | |||
Parameters: | Parameters: | ||
<!--T:12--> | |||
* '''$applicationApiKey''' String | * '''$applicationApiKey''' String | ||
<!--T:13--> | |||
Returns String. | Returns String. | ||
<!--T:14--> | |||
Returns an application's token string for an application. You should use this token to authenticate all calls of | Returns an application's token string for an application. You should use this token to authenticate all calls of | ||
[[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To | [[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To | ||
| Line 44: | Line 55: | ||
---- | ---- | ||
<translate> | <translate> | ||
=== getToken === | === getToken === <!--T:15--> | ||
<!--T:16--> | |||
<code>getToken($companyLogin, $apiKey)</code> | <code>getToken($companyLogin, $apiKey)</code> | ||
<!--T:17--> | |||
Parameters: | Parameters: | ||
<!--T:18--> | |||
* '''$companyLogin''' String | * '''$companyLogin''' String | ||
* '''$apiKey''' String | * '''$apiKey''' String | ||
<!--T:19--> | |||
Returns String. | Returns String. | ||
<!--T:20--> | |||
Returns an application's token string for a company. You should use this token to authenticate all calls of | Returns an application's token string for a company. You should use this token to authenticate all calls of | ||
[[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To | [[Company public service methods|Company public service API methods]] and [[Catalogue|Catalogue API methods]]. To | ||
| Line 62: | Line 78: | ||
---- | ---- | ||
<translate> | <translate> | ||
=== getUserToken === | === getUserToken === <!--T:21--> | ||
<!--T:22--> | |||
<code>getUserToken($companyLogin, $userLogin, $userPassword)</code> | <code>getUserToken($companyLogin, $userLogin, $userPassword)</code> | ||
<!--T:23--> | |||
Parameters: | Parameters: | ||
<!--T:24--> | |||
* '''$companyLogin''' String a company identifier (login) | * '''$companyLogin''' String a company identifier (login) | ||
* '''$userLogin''' String user's login associated with company | * '''$userLogin''' String user's login associated with company | ||
* '''$userPassword''' String user's password | * '''$userPassword''' String user's password | ||
<!--T:25--> | |||
Returns String. | Returns String. | ||
<!--T:26--> | |||
Returns an authentication token string for certain user registered for company. You should use this token to | Returns an authentication token string for certain user registered for company. You should use this token to | ||
authenticate all calls of [[Company administration service methods|Company administration service API methods]] and | authenticate all calls of [[Company administration service methods|Company administration service API methods]] and | ||
| Line 80: | Line 101: | ||
<translate> | <translate> | ||
==Constants== | ==Constants== <!--T:27--> | ||
=== Error codes === | === Error codes === <!--T:28--> | ||
<!--T:29--> | |||
See [[Errors handling]] for details. | See [[Errors handling]] for details. | ||
<!--T:30--> | |||
* -33001 Company does not exist | * -33001 Company does not exist | ||
* -33002 Wrong API key | * -33002 Wrong API key | ||
Latest revision as of 13:11, 15 May 2025
Methods
getServiceUrl
getServiceUrl($companyLogin)
Parameters:
- $companyLogin String
Returns String.
Returns API url for given company login
getApplicationToken
getApplicationToken($applicationApiKey)
Parameters:
- $applicationApiKey String
Returns String.
Returns an application's token string for an application. You should use this token to authenticate all calls of Company public service API methods and Catalogue API methods. To get application API key please contact SimplyBook.me support team.
getToken
getToken($companyLogin, $apiKey)
Parameters:
- $companyLogin String
- $apiKey String
Returns String.
Returns an application's token string for a company. You should use this token to authenticate all calls of Company public service API methods and Catalogue API methods. To get application API key you need to enable API Custom Feature.
getUserToken
getUserToken($companyLogin, $userLogin, $userPassword)
Parameters:
- $companyLogin String a company identifier (login)
- $userLogin String user's login associated with company
- $userPassword String user's password
Returns String.
Returns an authentication token string for certain user registered for company. You should use this token to authenticate all calls of Company administration service API methods and Catalogue API methods.
Constants
Error codes
See Errors handling for details.
- -33001 Company does not exist
- -33002 Wrong API key
- -33003 User with this login and password not found
- -33004 User is blocked
- -33005 You are not allowed to use this application when HIPAA Custom Feature is enabled