Search code examples
androidgoogle-apismsandroid-sms

Google SMS Retriever API doesn't work in Turkey


We've a problem as Android Developers in Turkey, about Google SMS Retriever API. We can't use this API. https://developers.google.com/identity/sms-retriever/

API says "End with an 11-character hash string that identifies your app". The problem begins here. Because, according to Turkish laws "If you are a company and you want to send sms your customers, then you need to add a your company code like BXXX to end of sms". Sms looks like this;

SMS SCREEN SHOT

There is a conflict here. We need to add company code to the end of sms but API also wants to add hashcode to end of sms. How can we solve this problem? Why should it be in the end? It should be enough to be in sms.


Solution

  • It was a known issue reported by @Cafer Mert Ceyhan and now it is fixed. Update the dependencies to specified versions below:

    implementation 'com.google.android.gms:play-services-auth:18.0.0'
    implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
    

    Thank you Mert for reporting to Google.