Getting a list of active activations
The getActiveActivations method is used to retrieve the current list of all active virtual number activations for the user through the SMS.online API. It enables automated monitoring of current activations and allows for quick status checks on the numbers.
This method is ideal for systems that require real-time tracking of activated numbers. It provides data on numbers that are in the process of activation or awaiting confirmation.
A successful request returns an object listing active activations, including unique identifiers, activation statuses, and associated numbers. This ensures flexible management of active activations in automated systems.
Example Request:
Input Data
Parameter | Required | Note | Description |
---|---|---|---|
Yes | See in profile settings API Key | API key provides access to paid services | |
Yes | getActiveActivations | Method name |
Server Response
JSON
{ "status":"success", "activeActivations": [ { "activationId" : "635468021", "countryCode" : "0", "countryName" : "Russia", "serviceCode" : "vk", "phoneNumber" : "79********1", "activationCost" : 12.50, "activationStatus" : "4", "smsCode" : ["CODE"], "activationTime" : "2022-06-01 16:59:16" } ] }
Example Code
const api_key = "API_KEY"; # Replace 'API_KEY' with your actual API key.try {const response = await fetch(`https://api.sms.onlinestubs/handler_api.php?api_key=${api_key}&action=getActiveActivations`);# Make a GET request to the specified URLconst data = await response.json();# Output the content of the server responseconsole.log(data);} catch (err) {# If an error occurred, output the error messageconsole.error(err);}
Possible Errors
Parameter | Description |
---|---|
Invalid action | |
Invalid API key | |
Error in query | |
Time until account is unbanned | |
Account is inactive | |
No active activations |