[#456] getApplicationToken not giving response

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”
}

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

Monika Aggarwal wrote:

Header is:
https://user-api.simplybook.me/login
Method: POST

Monika Aggarwal wrote:

Request:

{
“id”:“1”,
“method”:“getApplicationToken”,
“params”:[“here i am putting my api key”]
}

Response:
{
“result”: null,
“id”: “1”
}

Redmine Admin wrote:

this is not RAW http request

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

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?

Redmine Admin wrote:

we do NOT provide any access to catalog API

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.

Redmine Admin wrote:

Unfortunately there is no way to do it now.