Q&A

How to get follow/unfollow status fromj python SDK?

Dear Community,

So far we can recognize follow/unfollow event from the webhook(https://developers.line.biz/en/reference/messaging-api/#message-event). Do we have an API from SDK Line python to get a list of our user from our line channel that unfollow our line channel?

Because we have situation that our customer Line channel account manage by other 3rd party, but they asked us to filter the unfollow user from their line channel, which's we don't have access to their webhook, only can access their line channel by access token( channel id and channel secret).

thanks a lot, best regards,

  • 0
  • 1
  • 277
  • twitter facebook

You can user follow/unfollow event from linebot.models.

from linebot.models import {
	FollowEvent,
	UnFollowEvent
}

Then, you can use event handler.

@handler.add(FollowEvent)
def handle_follow():
    # do something


@handler.add(UnFollowEvent)
def handle_follow():
    # do something
  • 0
本当によろしいですか? question.vm