Question Details

Answered
How to get userId for Messaging API?

I have create "Trial Plan" for Messaging API, and i make friend with some acount Line (A, B...). I want to push message to A. But i have not userId of A. How to get userId of A? What API to do this?

0
Profile picture
daind

Answers

1
Profile picture
Shoya
Posted: 2 months ago

You can get userId when make friend with bot or send some message to bot. https://developers.line.biz/en/reference/messaging-api/#follow-event

{
  "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
  "type": "follow",
  "timestamp": 1462629479859,
  "source": {
    "type": "user",
    "userId": "U4af4980629..."
  }
}
Are you sure? question.vm