line / flutter_line_sdk

A Flutter plugin that lets developers access LINE's native SDKs in Flutter apps with Dart.
https://developers.line.biz/
Apache License 2.0
213 stars 42 forks source link

How can I get line_id of my account when I logged in with Line Login? #64

Closed nguyenvanan18031993 closed 1 year ago

nguyenvanan18031993 commented 2 years ago

Thanks so much for your awesome SDK. I'm using this SDK to log in with my Line app. After that I need to find my Line_id which can help me save that which can help the manager open the Line app which has that profile to add friends.

onevcat commented 1 year ago

Hi,

Sorry for the late reply.

As a third-party user, you cannot get the actual LINE ID of the user which being used in LINE app itself. As a private communication app, LINE cannot share that user actual ID to your apps. Otherwise, the third-party app can construct a relationship of users without proper agreement (moreover, it is definitely user privacy and with legal issues).

Instead, LINE SDK would return you back with an encrypted user ID just for your app / channel. It is guaranteed to be the same for the same channel, but be different for different channels (and LINE app). This ID can be retrieved in the result after login (mentioned here).