Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
android-sms-gateway
Advanced tools
Readme
This is a JavaScript/TypeScript client library for interfacing with the Android SMS Gateway API.
Before you begin, ensure you have met the following requirements:
To install the SMS Gateway API Client, run this command in your terminal:
npm install sms-gateway-client
Here's how to get started with the SMS Gateway API Client:
Client
class from the library.Client
with your login credentials.send
method to send an SMS message.getState
method to check the status of a sent message.const { Client } = require('sms-gateway-client');
// Example of an HTTP client based on fetch
const httpFetchClient = {
get: async (url, headers) => {
const response = await fetch(url, {
method: "GET",
headers
});
return response.json();
},
post: async (url, body, headers) => {
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body)
});
return response.json();
}
};
// Initialize the client with your API credentials
const apiClient = new Client('your_login', 'your_password', httpFetchClient);
// Example: Send an SMS message
const message = {
phoneNumbers: ['+1234567890', '+9876543210'],
message: 'Your SMS message text here'
};
apiClient.send(message)
.then(messageState => console.log(messageState))
.catch(error => console.error(error));
// Example: Get the state of an SMS message
const messageId = 'your_message_id';
apiClient.getState(messageId)
.then(messageState => console.log(messageState))
.catch(error => console.error(error));
For more information on the API endpoints and data structures, please consult the Android SMS Gateway API documentation.
Contributions are welcome! Please submit a pull request or create an issue for anything you'd like to add or change.
This library is open-sourced software licensed under the Apache-2.0 license.
FAQs
A JS/TS client library for sending and managing SMS messages via the Android SMS Gateway API
The npm package android-sms-gateway receives a total of 2 weekly downloads. As such, android-sms-gateway popularity was classified as not popular.
We found that android-sms-gateway demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.