Messenger Channel, get user profile id

Hello,

After succeeding in setting up a messenger bot.

I am trying To get the user profile name or id.

Is there any doc that describes hot To fetch messenger payload.

Best

Hey @Namec,

You can use the PSID that is sent from Facebook by Botpress to retrieve information (username, etc) about the Facebook user: https://developers.facebook.com/docs/messenger-platform/identity/user-profile

You can also use a after_incoming_middleware hook to intercept the incoming messages from Facebook. The PSID will be assigned to the target field of the event in the Hook.

Perfect,

I am using Event.target To get my data, and it works well

Best

hi , i have trouble to get facebook user data ! could you show me the code how to get user information pls.

:frowning: i taking long time for this until now .

@Namec can you share your code please?