Question

I am using bit.ly to shorten a long, one time URL that I am sending via SMS to a user to verify their phone number. The problem is that Bit.ly seems to be sending a request to this URL at the time of the short URL creation, I assume to validate it on their end before shortening. This is causing the user's phone number to be verified before the user even gets the link to click it.

Is there a solution here? I don't really want to add an additional step to verification process. It should be just a one action event required by the user (clicking the link). Can I easily determine and ignore (or handle differently) the bit.ly request to the URL somehow?

Was it helpful?

Solution

Found the answer.

All requests from Bitly should have the User-Agent "bitlybot", which makes it possible to ignore such requests.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top