Q&A

Get user ID when user click to the Liff url ?

How can i get the user ID as a parameter when user click to Liff Url ? If it is impossible, LINE team can help us adding the user ID as a default paramter to Liff URL, so i can get the user ID in my endpoint URL. Thank you so much.

  • 0
  • 3
  • 6138
  • twitter facebook

Hi if you dont use liff.js you need to add userID append liffURL. Use case: Customer chat with bot in web hook you can get userContext e.g userId and response to user with liffurl+query string e.g

liff://liffId?userId=userId

Sorry for my bad english hope you can understand!

  • 0

Thank you, I known that way , but I mean when user click Liff URL on LINE app, LINE server can set the user ID in request and then I can get the user ID in my endpoint URL (I'm using Laravel). NOT USING Javascript (https://static.line-scdn.net/liff/edge/2.1/sdk.js), because we have a problem by that way. Hope you can understand.

  • 0

You can use LIFF API method liff.getProfile() for get userId see detail from link below https://developers.line.biz/en/reference/liff/

  • 0
Are you sure? question.vm