skip to Main Content

I am trying to send the user a link in the telegram chat and I want to make sure no one has access to the link (PHP on my server) except the user through the chat session.

In PHP, I can get the IP of the user $ip_address = $_SERVER['REMOTE_ADDR'];
If I can get the user IP from telegram, then I can match them to tell if the same user (same session or network).

Is there any way to get the user IP in telegram?
Is there any other method to do the previous idea without using IPs?

2

Answers


  1. No, you can’t access the users IP address. The user could also be using different clients with different IP addresses at the same time, so this wouldn’t even be very helpful.

    Login or Signup to reply.
  2. I know it’s a little bit old question, but what about using ChatID or USERNAME as a unique id, as user won’t change his username everyday.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search