Question Details

Answered
How can I find a user's LINE ID from their User ID using the Messaging API

I have a bot that uses the Messaging API and I can get a user ID from a webhook but I need to associate them with LINE IDs.

I see that there is a get-profile endpoint but it only returns: displayName, userId, pictureUrl, & statusMessage, it does not contain the LINE ID

0
Profile picture
Francisco Gutierrez

Answers

3
Profile picture
bottsjw-War Phoenix
Posted: 2 months ago

LINE ID isn't exposed via the Messaging API or Social API. You can only retrieve the userId and displayName values.

Profile picture
LnwasiaTH
Posted: 2 months ago
Edited: 2 months ago

There is an endpoint: Converting an MID to a user ID ( https://api.line.me/v2/bot/dedisco/migration/userId ) but I do not have permissions, I get 403: Forbiden in response. Currently permissions of my provider are: PROFILE, OPENID_CONNECT. And I do not know how to extend it. Can somebody help me to extend my permissions to get user line ID?

Profile picture
bottsjw-War Phoenix
Posted: 1 months ago

You’ll only have access to that end point if your channel was created before the release of V2. It was for use during the transition. It was not the same as the searchable LINE ID used in app. 

Are you sure? question.vm