Basic
SiQURO use Basic access authentication proposed in RFC 7617 as a authentication mechanism.
| Param | Value |
|---|---|
| Username | Merchant ID |
| Password | API key token |
The client sends HTTP requests with the Authorization header that contains the word Basic word followed by a space, and a base64-encoded string username:password. For example, to authorize as merchant ID 1 and token EXAMPLE the client would send Authorization: Basic MTpFWEFNUExF
Many http requests like CURL libs supports basic out of box
$ch = curl_init($host);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERPWD, $merchant_id . ":" . $token_api_key);
$return = curl_exec($ch);
curl_close($ch);though you can always make header manually
$headers = array(
'Content-Type:application/json',
'Authorization: Basic '. base64_encode($merchant_id . ":" . $token_api_key) // <---
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);