Socket
Socket
Sign inDemoInstall

capacitor-sms-retriever

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    capacitor-sms-retriever

Android SMS Retriever API for Capacitor.


Version published
Weekly downloads
14
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

capacitor-sms-retriever

With the SMS Retriever API, you can perform SMS-based user verification in your Android app automatically, without requiring the user to manually type verification codes, and without requiring any extra app permissions.



Install

npm install capacitor-sms-retriever
npx cap sync

API

getAppSignature()

getAppSignature() => Promise<AppSignature>

This is a helper method to generate your message hash to be included in your SMS message. Without the correct hash, your app won't receive the message callback. This only needs to be generated once per app and stored.

Note: Do not use hash strings dynamically computed on the client in your verification messages.

Returns: Promise<AppSignature>

Since: 0.1.0


requestPhoneNumber()

requestPhoneNumber() => Promise<HintPhoneNumber>

Initiate hint picker to prompt the user to choose from the phone numbers stored on the device.

Returns: Promise<HintPhoneNumber>

Since: 0.1.0


startSmsReceiver()

startSmsReceiver() => Promise<RegisterReceiver>

Start to listen for SMS messages.

Returns: Promise<RegisterReceiver>

Since: 0.1.0


removeSmsReceiver()

removeSmsReceiver() => Promise<void>

Stop to listen for SMS messages.

Since: 0.1.0


addListener('onSmsReceive', ...)

addListener(eventName: 'onSmsReceive', listenerFunc: (receivedMessage: ReceivedMessage) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for when SMS is coming

ParamType
eventName'onSmsReceive'
listenerFunc(receivedMessage: ReceivedMessage) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.1.0


Interfaces

AppSignature
PropTypeDescriptionSince
signaturestringApp signature.0.1.0
HintPhoneNumber
PropTypeDescriptionSince
phoneNumberstringPhone number user selected0.1.0
RegisterReceiver
PropTypeDescriptionSince
isRegisteredbooleanReturns if register receiver started or not.0.1.0
PluginListenerHandle
PropType
remove() => Promise<void>
ReceivedMessage
PropTypeDescriptionSince
messagestringReceived message with hash0.1.0
errorstringIn case of any error0.1.0

Keywords

FAQs

Last updated on 05 May 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc