Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Hi,
We have a problem with the using of the API Key.
We used the GET method and succeeded seeing datas. Then, we encrypted the datas in AES 256 but we are facing a problem when we tried to use the POST method.
We have this error : {"error":"invalid API query", "message":"'data' is not correctly encoded for method POST. Request for correct API KEY"}. We tried several times and have the same error.
Do you think this problem can be caused by the encoding data method. Are we supposed to use base64 for the API ?
Also, where can we modify the AES encryption code, in which file ?
Thank you in advance.
You must encrypt with AES 128, using API Key.
Unless you define $aesKeyLength in parameters.php default is 128 (not 256 as it is illegal in some countries)
$data=AesCtr::encrypt($data, $apiKey, Parameter::getGlobalParameter('aesKeyLength'));
We checked the file fileconfig/parameters.php but we don't have $data and $aesKeyLength.
Is it normal ?
Are we supposed to add them ?
Yes it is normal.
$aesKeyLength is not defined by default, and encryption uses 128bits.
You must define it yourself if you want to change this
Thank you.
But we don't have the line with $data neither.
No, the line is an example of what you have to write to encode data.
OK, thank you for your replies