SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Rental SMS

GET /api/rent.php?method=sms

SMSPVA API
GEThttps://smspva.com/api/rent.php?method=sms

Send a GET request and check status in the JSON response: 1 means success and 0 means failure, even with HTTP 200. If it fails, read msg for the reason.

Authentication

Send apikey as a required query parameter.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"sms"Method name
apikeyquerystringYesSMSPVA_API_KEYYour API key You can find it on the website in the top right drop-down menu in the Profile and APIKEY section
idqueryintegerYes123ID of order

How to use this method

Read messages for a rental using its ID from Rental orders. Before sending a message to that number, activate the order and confirm its state in the order list.

Request examples

Environment and dependencies. Each example encodes query values and allows 30 seconds for the request. Check HTTP and JSON status before using data. cURL prints the response for you to check; Java uses Jackson to read the JSON.

  • SMSPVA_RENTAL_ORDER_ID: id.
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
: "${SMSPVA_RENTAL_ORDER_ID:?Set SMSPVA_RENTAL_ORDER_ID}"
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent.php" \
  --data-urlencode "method=sms" \
  --data-urlencode "apikey=$SMSPVA_API_KEY" \
  --data-urlencode "id=$SMSPVA_RENTAL_ORDER_ID"

Responses

Check the response that matches your request. Example values and dates are illustrative. Optional fields can depend on the outcome or the response format you selected.

HTTP 200

Success

application/json

Illustrative response

{
  "status": 1,
  "data": {
    "SmsList": [
      {
        "text": "Code Instagram: 671 094.",
        "sender": "FACEBOOK",
        "date": 1586948100
      }
    ],
    "OtherSms": []
  }
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataobject
data.SmsListarray<object>List of received SMS
data.SmsList[].textstringText of SMS
data.SmsList[].senderstringSender of the SMS
data.SmsList[].dateintegerUnix timestamp of receiving date
data.OtherSmsarray<unspecified>List of other SMS

On this page