VIBER + SMS API
Autorización
Autenticación básica
Example:
$userHashKey = 'User Hash Key provided by your account manager';
$ch = curl_init('https://web.it-decision.com/v1/api/send-viber');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$userHashKey");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($requestParams)); //
$requestParams - raquest array with correct data
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
curl_close($ch);Enviar mensaje de Viber
Parámetros
Response:
Valores:
Get message from a user for 2Way messages:
Response:
Valores
Recibir mensaje de Viber
Parámetros
Valores
Estados de los mensajes de Viber
sent
0
Estados de los mensajes SMS
delivered
2
Errores
Name
Too Many Requests
Name
Invalid Parameter: [param_name]
Name
Internal server error
Name
Topup balance is required
Ejemplo de Viber + SMS
Last updated