Sniper Link streamlines email confirmation. Once a user provides their email, they can be shown a button that sends them directly to their respective inbox, filtered down to the given sender and bypassing the spam folder.
The default text on the Sniper Link button is “Open in {provider}”, but you can change it using the template attribute:
Code Example:
<sniper-linkrecipient="me@gmail.com"sender="justin@buttondown.email"template="Confirm email using {provider}"></sniper-link>
Unrecognized providers
We’re working on supporting as many providers as possible. Currently, we support Gmail, Yahoo, Proton, iCloud, Outlook, HEY, AOL, and Mail.ru, and we’re adding additional ones. Let us know (support@buttondown.com) if there’s a provider you’d like us to add!
When the email provider cannot be determined, the sniper-linkelement will have a hidden attribute. This attribute can be used for styling the button or the adjacent elements.
Usage with an HTML Buttondown form
Sniper Link can be used with Buttondown’s custom HTML subscribe forms, using a bit of extra JavaScript. Here’s an example:
If you want to create your own custom button, you can directly depend on our API to construct it:
GET https://sniperl.ink/v1/render?recipient={recipient}&sender={sender}
It’s useful to do this API call from the frontend, because the endpoint also relies on the User-Agent to determine whether the device is desktop, iOS, or Android.