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
Parameter | Required | Note | Description |
---|---|---|---|
Yes | See in profile settings API Key | API key provides access to paid services | |
Yes | getStatus | Method name | |
Yes | Numeric value | Activation ID obtained when requesting the number |
Server Response
Server Response | Description |
---|---|
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 numbertry {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 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 | |
Activation not found |