Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webhooks failing with "Invalid Scopes: pages_messaging_subscriptions" [duplicate]

I had a submitted and approved Facebook messenger bot working. But I just got a developer update just now saying "Your Webhooks subscription for callback URL https://BOTNAME.herokuapp.com/ has not been accepting updates for at least 16 minutes. Please verify that your callback server is functioning."

I do see that my callback server and application is working on Heroku.

This problem usually gets solved if I generate a new page access token and restart the web application with this new page access token in it. But this time I'm unable to generate an access token either.

I tried generating a new page access token from my Developer account page for the specific page on which the app is running, but the error now says "Invalid Scopes: pages_messaging_subscriptions. This message is only shown to developers. Users of your app will ignore these permissions if present." There is no Documentation on this. Any suggestions?

like image 494
Rahul Venkatraj Avatar asked Oct 30 '22 22:10

Rahul Venkatraj


1 Answers

I got this message today also. This is the bug from Facebook.

Right now, you can get Page Access Token via Graph API Explorer instead of App Dashboard.

  1. Go to: https://developers.facebook.com/tools/explorer/
  2. Click Get Token > Get User Access Token
  3. Select the following scopes : manage_pages, pages_messaging, and pages_messaging_phone_number.
  4. In Application selector, select your app.
  5. Select your page to get Page Access Token.

Now you have Page Access Token, which you can use it for your Messenger Bot.

Check whether it worked by doing :

curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token={{your_access_token}}"

like image 171
Tan Nguyen Avatar answered Dec 03 '22 22:12

Tan Nguyen