Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
messages-web
Advanced tools
### What is this? - this is a [Google Messages](https://messages.android.com) Client library to send message with a backend .eg. with express to send otp messages. This module uses your own number to work as a sms gateway api and you can send message to o
npm install messages-web
const { default: MessagesClient } = require('messages-web')
const fs = require('fs')
const client = new MessagesClient()
client.on('qr-code', (base64Image) => {
// example code to save image
fs.writeFileSync('qr.jpg', base64Image.replace(/^data:image\/png;base64,/, ""), { encoding: 'base64' })
// your code
})
client.on('authenticated', async (service) => {
const inbox = service.getInbox()
const credentials = await client.getCredentials()
fs.writeFileSync('credentials.json', JSON.stringify(credentials, null, '\t'))
await client.quit()
})
Then you can use credentials.json
file to login
const { default: MessagesClient } = require('messages-web')
const credentials = MessagesClient.loadCredentialFile('credentials.json')
const client = new MessagesClient({ credentials })
client.on('authenticated', async (service) => {
const inbox = await service.getInbox()
console.log('Inbox', inbox)
await client.quit()
})
const { default: MessagesClient } = require('messages-web')
const credentials = MessagesClient.loadCredentialFile('credentials.json')
const client = new MessagesClient({ credentials })
client.on('authenticated', async (service) => {
console.log('Sending message...')
await service.sendMessage('+91987654321', 'Test message from SMS Client.')
console.log('Done!')
await client.quit()
})
Note: sendMessage
takes first arg as number with countryCode + Number
second arg as TextMessage
ISC - Swapnil Soni ©
FAQs
### What is this? - this is a [Google Messages](https://messages.android.com) Client library to send message with a backend .eg. with express to send otp messages. This module uses your own number to work as a sms gateway api and you can send message to o
The npm package messages-web receives a total of 10 weekly downloads. As such, messages-web popularity was classified as not popular.
We found that messages-web 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.