Migrated from Redmine #879 | Author: Sean Hurley
Status: New | Priority: High, I’m very impatient | Created: 2022-05-04
We recently migrated a Simplybook account to a new cluster account. The API Custom Feature had been working correctly prior to migration, but now it is failing, typically with a “[-32000] Wrong API Key” response even though the API key we’re using seems to match the one associated with the subaccount.
Below are the details:
Login: waketechcc (full subaccount URL is waketechcc.secure.simplybook.us; prior to migration, URL was waketechcc.secure.simplybook.me)
Service URL: Prior to migration, “http://user-api.simplybook.me” was the correct value. Since migration, we’ve tried several other values e.g., http://user-api.simplybook.us without success.
API Key: e3640a765d6786f5233fcfc4fb0e77c28822143bbd1cc6ca16313a6560d404aa
It looks like Support #823 had a similar in December 2021 but there’s not a clear resolution indicated on that ticket.
Redmine Admin wrote:
hi, please use https protocol
did following test and everything works fine
<?php
include "JsonRpcClient.php";
define('YOUR_COMPANY_LOGIN', 'waketechcc');
define('YOUR_API_KEY', 'e3640a765d6786f5233fcfc4fb0e77c28822143bbd1cc6ca16313a6560d404aa');
$loginClient = new JsonRpcClient('https://user-api.simplybook.us/login');
$token = $loginClient->getToken(YOUR_COMPANY_LOGIN, YOUR_API_KEY);
var_dump($token);
?>
Sean Hurley wrote:
Redmine Admin wrote:
hi, please use https protocol
did following test and everything works fine
[…]
Thank you for the prompt response.
When you say “HTTPS Protocol” does this refer to the service URL? I have tried with both “https://user-api.simplybook.me” and “https://user-api.simplybook.us” and the same login/API key combo and both still return the same unsuccessful “[-32000] Wrong API Key” response. I would assume it needs to be both an “https://…” service URL and a “.us” domain rather than “.me”. Am I correct on both items?
Redmine Admin wrote:
Prior to migration, "http://user-api.simplybook.me"
this must be changed to https://user-api.simplybook.us – please use https protocol, always
Sean Hurley wrote:
Redmine Admin wrote:
[…]
this must be changed to https://user-api.simplybook.us – please use https protocol, always
Thanks for clarifying. We have been specifying “https://user-api.simplybook.us/” as the service URL for our attempts, so since it’s still failing, I assume we’ll need to look at the HTTP request our page is sending to see if it’s:
A) using HTTP instead of HTTPS
and/or
B) specifying an invalid “.me” domain instead of the required “.us”.
Does that sound accurate? If so, I can have one of my developers review and modify as necessary.
Redmine Admin wrote:
please use code we sent above, it is 100% working as we did tests and got API token