Would you like to refer to the content below?
Checklist to use the Messaging API and the Retrieving list of friends API