Esta API le permite enviar SMS de manera sencilla. A continuación encontrará un ejemplo de uso.
POST https://sms.1000rifas.com/sendsms
SMS-API-KEY: <TU_API_KEY>
{
"numberPhone": "04141234567",
"textContent": "Tu mensaje de prueba aquí"
}
curl -X POST \
'https://sms.1000rifas.com/sendsms' \
--header 'SMS-API-KEY: TU_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"numberPhone": "04241234567",
"textContent": "Recuperacion 1000juegos: https://1000juegos.com/newpass?=83737382j3uw8w7w7qjjw"
}'
axios.post('https://sms.1000rifas.com/sendsms', {
numberPhone: '04241234567',
textContent: 'Recuperacion 1000juegos: https://1000juegos.com/newpass?=83737382j3uw8w7w7qjjw'
}, {
headers: {
'SMS-API-KEY': 'TU_API_KEY',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response ? error.response.data : error.message);
});
<?php
$ch = curl_init('https://sms.1000rifas.com/sendsms');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'SMS-API-KEY: TU_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'numberPhone' => '04241234567',
'textContent' => 'Recuperacion 1000juegos: https://1000juegos.com/newpass?=83737382j3uw8w7w7qjjw'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
if ($error) {
echo 'Error: ' . $error;
} else {
echo $response;
}
?>
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl;
CURLcode res;
const char *data = "{\"numberPhone\":\"04241234567\",\"textContent\":\"Recuperacion 1000juegos: https://1000juegos.com/newpass?=83737382j3uw8w7w7qjjw\"}";
curl = curl_easy_init();
if(curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "SMS-API-KEY: TU_API_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://sms.1000rifas.com/sendsms");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
Cada número de teléfono puede recibir hasta 5 mensajes por día. A partir del sexto intento, la API responderá un error indicando que se ha alcanzado el límite diario.