Hi,
Using:
I am trying to retrieve the status of the sent SMS using the transaction ID.
HMAC Authentication:
$client = new Client();
$response = $client->request(
'GET',
"https://rest.spirius.com/v1/sms/mt/status" . "/{$id}",
[
'headers' => [
"X-SMS-Timestamp" => <timestamp>
"Authorization" => "SpiriusSmsV1 <username>:<generated hash>"
]
]
);
Returns: 401 Unauthorised response { "detail": "Not authenticated" }
Basic Authentication
$client = new Client();
$response = $client->request(
'GET',
"https://rest.spirius.com/v1/sms/mt/status" . "/{$id}",
[
'headers' => [
'Authorization' => 'Basic '. base64_encode($this->username . ":" . $this->password)
],
]
);
Returns 200 Response
[
"result" => 1
"statusCode" => 1
"detail" => "The message has been successfully delivered"
"transactionId" => "<transaction id>"
"timestamp" => "<timestamp>"
"timezone" => "<timezone>"
]
Also tried
$client = new Client();
$response = $client->request(
'GET',
"https://rest.spirius.com/v1/sms/mt/status" . "/{$id}",
[
'headers' => [
"Authorization" => "SpiriusSmsV1 <username>:<generated hash>"
]
]
);
Returns: 401 Unauthorised response { "detail": "Not authenticated" }
Please note the generated hash is valid as I am able to send SMS using the HMAC Authentication method.
Is HMAC authentication supported to get the status of the SMS? Or is it only available via Basic Authentication?
Thank you.
Hi,
Using:
I am trying to retrieve the status of the sent SMS using the transaction ID.
HMAC Authentication:
Returns: 401 Unauthorised response
{ "detail": "Not authenticated" }Basic Authentication
Returns 200 Response
Also tried
Returns: 401 Unauthorised response
{ "detail": "Not authenticated" }Please note the generated hash is valid as I am able to send SMS using the HMAC Authentication method.
Is HMAC authentication supported to get the status of the SMS? Or is it only available via Basic Authentication?
Thank you.