Member-only story
Android Automatic SMS Verification With Google’s SMS Retriever API
Easily verify one-time passwords, reducing the overhead for your users

In Android apps, it’s become a common procedure to use a mobile number as a user handle to verify the users. For this, technically speaking, we ask users for their mobile number and then hit an API with that number from the server. An SMS gets triggered and is received on the user mobile. The user enters this SMS code in the box provided to access the content of the app. Here there is a little bit overhead in the user experience.
This would be better if we automatically read the SMS code and verified the user in the background while in the foreground, the user is getting onboarded. If we can’t do the verification in the background, we can ask the user to enter it manually once the user is onboarded and before moving to the dashboard or home screen. This would ease the process and help the user to get onboarded easily. This would be a good feature that would differentiate your app from other apps that force users to enter it manually.
Introduction to SMS Retiever API
Google has introduced an SMS Retriever API with which we can perform SMS-based user verification in our Android app automatically, without requiring the…