Search code examples
androidsmsmessagepreview

Messages app in Android triggers GET links without user interaction


I'm sending a confirmation link via SMS to my user.

When the SMS arrives on the device, a GET request is triggered to the link without any user interaction, thus confirming my appointment.

Is there a way to detect if the GET request was triggered by the user or some preview or security get request ?


Solution

  • It turns out, the Google Messages app tries to get a preview of the url.

    I found this user agent

    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Google (+https://developers.google.com/+/web/snippet/)
    

    Now I'm simply ignoring user agents with the string snippet.