$computedHash = base64_encode(hash_hmac ( 'md5' , $this->authServiceUrl , $this->password, true ));
$authorization = 'Authorization: Bearer '.$this->username.':'.$computedHash;
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, '');
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
curl_setopt($curl, CURLOPT_URL, $this->authServiceUrl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
I've got the Auth token & url1.- Token (class TokenGenerator):
you must first generate the token to access the diagnostics
PHP:$computedHash = base64_encode(hash_hmac ( 'md5' , $this->authServiceUrl , $this->password, true )); $authorization = 'Authorization: Bearer '.$this->username.':'.$computedHash; $curl = curl_init(); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, ''); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization )); curl_setopt($curl, CURLOPT_URL, $this->authServiceUrl); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
2.- priaid_client (class DiagnosisClient)
I'll give you the conversion code to B4X ...
$computedHash = base64_encode(hash_hmac ( 'md5' , $this->authServiceUrl , $this->password, true ));
I'm not sure if it's B4X, but it's encrypted by the looks of it. Below screenshot to assist. Do you think that's in hash? documentation by api medic https://sandbox-authservice.priaid.ch/docs.htmlPHP: hash_hmac - Manual
www.php.net
in B4X????
This would be great, I'd like to see how you go about implementing this as this is my first time dealing with API. Seems like it's a very massive undertaking, so I'd like to check by exampleI'm going to do some examples of these, as I'm interested in what I've seen of these APIs.
we have some APP in the medical area.
yesI have documentation for it if that's what you were asking for?
you will find it under. 'API keys' tab. There will be 4 types of documentation. 2 for Live Data and 2 for Dummyyes
I did find
but no documentation; even not in their website after registration for a free account.GitHub - priaid-eHealth/symptomchecker: priaid (under the subbrand ApiMedic) offers a medical symptom checker primarily for patients. Based on the entered symptoms it tells you what possible diseases you have. It directs you to more medical informati
priaid (under the subbrand ApiMedic) offers a medical symptom checker primarily for patients. Based on the entered symptoms it tells you what possible diseases you have. It directs you to more medi...github.com
I can get api key but i did not found any Documentation.