Activation Status Retrieval

The getStatus method allows you to retrieve the current activation status of a virtual number via the SMS.online API. It's used for automated checks of activation status on external platforms where SMS confirmation is required.

This method tracks the activation process after receiving the number and provides information on whether the confirmation code message was delivered, as well as the current status of the number in the system.

A successful request returns a string with information about the current activation status, message status, and the code itself (if received). This method is convenient for integration into systems that require real-time status monitoring.

Example Request:

Input Data

ParameterRequiredNoteDescription
YesSee in profile settings API KeyAPI key provides access to paid services
YesgetStatusMethod name
YesNumeric valueActivation ID obtained when requesting the number

Server Response

Server ResponseDescription
Waiting for code
Waiting for SMS to be resent
Cancelled
Success (where $CODE is the activation code)

Example Code

const api_key = "API_KEY"; # Replace 'API_KEY' with your actual API key.
const id = 1; # Insert the activation ID obtained when requesting the number
try {
const response = await fetch(`https://api.sms.onlinestubs/handler_api.php?api_key=${api_key}&action=getStatus&id=${id}`);
# Make a GET request to the specified URL
const data = await response.json();
# Output the content of the server response
console.log(data);
} catch (err) {
# If an error occurred, output the error message
console.error(err);
}

Possible Errors

ParameterDescription
Invalid action
Invalid API key
Error in query
Time until account is unbanned
Account is inactive
Activation not found