How do you authenticate the chatbot backend per fb app? I have a chatbot id like to use with multiple applications, but id need to know what app is sending me a message. The only way I found so far is to include a unique (per app) token into the webhook url as a parameter. I am not sure if this is good/valid option or not?
I could not find any documentation about the topic either.
Assuming you refer to "multiple pages" and not "multiple apps" (at least that what your comments seem to refer to), each webhook event will include the actual page ID your app is connected to:
{"object":"page","entry":[{"id":"<this-is-the-page-id>","time":<timestamp>,"messaging": ...