How to connect your own application through Portal January 23, 2023 14:57 Updated Index: Setting up your own Facebook application to connect via Portal Product Settings: Facebook Login Product Settings: Webhooks (Only if using Organization) Webhook URL change Product Settings: Messenger (Only if using Organization) Messenger URL change Permissions required by the Facebook application to connect via the Portal Publishing through your own Facebook application via the Portal To publish your bot on Facebook using your own application through the Blip Portal you will need an Application previously created and analyzed by Facebook. If your own application is not yet configured correctly, follow the steps in Section 1 and Section 2 to configure. Otherwise, just follow the steps in Section 3. Setting up your own Facebook application to connect via Portal Important: For your application to work correctly you need to add the products: Facebook login, Messenger and Webhooks to your application. Product Settings: Facebook Login After adding the Facebook Login product, click on the Facebook Login menu → Settings and configure the customer's OAuth information as shown in the image below: Valid OAuth Redirect URIs: https://portal.blip.ai/facebookCallback Product Settings: Webhooks After adding the Webhooks product, it is necessary to configure which Messenger events will be sent by Facebook. To do this, in the Webhooks menu, select the Page option and click Subscribe to this Object. Fill in the values below: URL: https://messenger.gw.msging.net Token: ze3jRmmaLU5KUTtUN (Only if using Organization) Webhook URL change After performing the migration to Organization you will need to change the Url of the Webhook your Facebook application. Use the values below: Url: https: // {OrganizationOrganization} -messenger.gw.msging.net Token: ze3jRmmaLU5KUTtUN Note: Remember to replace {OrganizationID} with the corresponding value. Product Settings: Messenger After adding the Messenger product, and in possession of the two information below, click on the menu Messenger → Settings → Webhook and configure the information Callback Url and Check Token as shown below: Url: https: //messenger.gw.msging.net Token: ze3jRmmaLU5KUTtUN (Only if using Organization) Messenger URL change After performing the migration to Organization, it will be necessary to change the Callback Url in your Facebook application. Access your application, click on the Messenger menu, enter Settings and change the Callback Url and Verify Token information, with the data below: Url: https: // {OrganizationOrganization} -messenger.gw.msging.net Token: ze3jRmmaLU5KUTtUN Note: Remember to replace {OrganizationID} with the corresponding value. Access Messenger → Settings → Webhook → Webhook field version controls.Check that the version of the selected webhooks is marked as v8.0. Make changes if necessary, otherwise your application may be unstable. Permissions required by the Facebook application to connect via the Portal After creating the Facebook application, you will need to request some specific permissions for your application to work correctly with Blip. For this you must go to Application Analysis → Permissions and resources and request each permission separately. Here is the list of permissions and the reason for its use: pages_messaging: Send and reply to messages on Facebook Messenger automatically. pages_user_gender: The bots associated with the application can send messages in several languages. This permission will be used to apply the correct pronoun. pages_user_locale: The bots associated with the application can send messages to people in many countries. This permission can be used to direct people to bots that use their languages. pages_user_timezone: The bots associated with the application can send notifications to the user using Message Tags. This permission can be used to avoid sending notifications at inconvenient times, such as in the middle of the night. pages_manage_metadata: The application will use the pages_manage_metadata permission to allow the page administrator to sign webhooks to receive messages sent to the administrator's page. With these messages, we can create chatbots. The application will help the page administrator to manage the messages received by an automatic chat. Publishing through your own Facebook application via the Portal 3.1) Go to the Settings tab, and click the Use my own application button. The fields will be available for you to add the App ID and App Secret of your application on Facebook. 3.2) Go to your app's page on the Facebook dashbord. Click Settings → Basic. After that, your application's settings screen will appear, where the AppID (Application Id) and App Secret (Application Secret Key) are located. 3.3) Add this information in the Messenger configuration in Blip and click on Save Settings. 3.4) After that you will be redirected to the screen where the connection to Facebook will be completed. 3.5) After the connection with Facebook is completed, the pages for you to publish your bot will be listed. 3.6) Send a message to your Facebook page and test if the message reached your bot in Blip. Note: The bot can start responding within 3 minutes. For more information, visit the discussion on the subject in our community or the videos on our channel. 😊 Related articles How to publish your Chatbot to Messenger How to connect your own application through Advanced Settings How to build bots using SDKs or HTTP API How to connect to a personalized service channel How to save human service history via Blip Integration with Google Drive