system
December 16, 2019, 10:04am
1
Migrated from Redmine #456 | Author: Monika Aggarwal
Status: New | Priority: High, I’m very impatient | Created: 2019-12-16
Hi,
I am trying to get ApplicationToken using getApplicationToken API. Here i am adding api key from Appointment booking service and free online booking service this link. But getting null response. Can anyone help that which key will be used for this and how i will get that applicationKey?
{
“id”:“1”,
“method”:“getApplicationToken”,
“params”:[“here i am putting my api key”]
}
Response
{
“result”: null,
“id”: “1”
}
system
December 16, 2019, 10:06am
2
Redmine Admin wrote:
Please provide full RAW http request to see all headers and endpoints url.
You can find doc with examples here API documentation | SimplyBook.me Online Scheduling
system
December 16, 2019, 10:08am
3
Monika Aggarwal wrote:
Header is:
https://user-api.simplybook.me/login
Method: POST
system
December 16, 2019, 10:09am
4
Monika Aggarwal wrote:
Request:
{
“id”:“1”,
“method”:“getApplicationToken”,
“params”:[“here i am putting my api key”]
}
Response:
{
“result”: null,
“id”: “1”
}
system
December 16, 2019, 10:13am
5
Redmine Admin wrote:
this is not RAW http request
system
December 16, 2019, 10:22am
6
Redmine Admin wrote:
<?php
require_once 'JsonRpcClient.php';
try {
$loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/');
$token = $loginClient->getToken('hdhomeservices', 'STRIPPED_DATA_HERE');
$client = new JsonRpcClient('https://user-api.simplybook.me' . '/', array(
'headers' => array(
'X-Company-Login: ' . 'hdhomeservices',
'X-Token: ' . $token
)
));
} catch (Exception $e) {
var_dump($e);
exit();
}
var_dump($token);
$res = $client->getEventList();
var_dump($res);
?>
This code works just fine
system
December 16, 2019, 10:26am
7
Monika Aggarwal wrote:
But i want to use getApplicationToken method because i have to access Catalog api’s.
POST /login HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 139
Accept: application/json
{“jsonrpc”:“2.0”,“method”:“getApplicationToken”,“params”:[“api key”],“id”:1}
Instead of api key, i need application key. Can you please let me know that from where i will Application key?
system
December 16, 2019, 10:27am
8
Redmine Admin wrote:
we do NOT provide any access to catalog API
system
December 16, 2019, 10:34am
9
Monika Aggarwal wrote:
Okay, i want to show Promotions in my app and also want to add reviews, how i can access these api’s as these are under Catalog api section.
system
December 16, 2019, 10:38am
10
Redmine Admin wrote:
Unfortunately there is no way to do it now.