Botframework v4 - Facebook Channel - Operation returned an invalid status code 'Forbidden` - api

Last year I developed a chatbot with Microsoft Bot Framework that I integrated in the Facebook Messenger of a page. Everything worked fine until 16th of December (last successful log). The page is not used by a lot of people therefore the application might have worked also longer than that.
Today I tried to use the chatbot again and I did not get any response. In the Logs I just found the error message "Operation returned an invalid status code 'Forbidden`".
After a bit of Debugging I found out that the problem is sending messages back to the Facebook Messenger.
context.SendActivityAsync(...)
I did not change any configuration within my Azure Bot Channel registration recently. I am aware of the privacy changes within the Facebook API, but as I already struggle with sending a simple text response like "Hi" I assume that cannot be the problem. Also the permission scheme has changed for Facebook apps. I have the permission for "pages_messaging". Do I need another permission now? Or did I miss another change in the Facebook API?
Technical Details:
Facebook API Version v6 (tried also v9 but no change in behavior)
Chatbot based on .Net Core 2.1
Bot Builder SDK v 4.11
Any hints what I did wrong or where I can look for further information is much appreciated.
Edit: I tried to add a new page to my Facebook App and get following message:
There is a hint that a permission is missing, but I cannot find out which one I require. As I only send responses to FAQ's and if required handover to the customer service inbox I just requested the "pages_messaging" permission. Do I require any other permission now?

I found the problem. For everyone that might have the same problem:
In our case the administrator that added the Facebook pages to the application was removed from the admin permission list of the pages. After re-adding the admin permissions for the pages the bot started working again.

Related

Tiktok authentication for using api

Can anybody tell me that is it necessary that tiktok webapp should be approved for getting access token cuz my app is under reviewed and when I go to authentication page for callback authorization after login it is showing error
I followed all the instructions that were given in there documentation but i am stucked at the call back authorization
The status of your app should be Live in production. They usually give you feedback if there are any issues and in case it's declined. You have to make fixes accordingly to get the API functionality to work.
The reviewal process shouldn't take longer than 3 working days.

Can't get my app reviewed in Facebook API

I can't get my app to be reviewed through the Facebook API.
The app is purely a facebook messenger bot, and the app type is "business".
I have configured the specific permissions I need, however I recieve an error that states "You do not have any platforms eligible for review. Please configure a platform on your Settings page."
I also cannot add my app domain in the basic settings, as whenever I press save changes, the url does not save and disappears.
Additionally there is no option to make my app live.
Any advice?
The error message
I am leaving this answer in the event someone else needs it. It was an answer suggested by Facebook support when I encountered the same problem.
Go into App Settings and add a platform "Website"
Just add your website URL.
If the requested permission is just Messenger based then the website will not be accessed or tested.

can we retrieve Facebook leads without Facebook APP Review

I have created an App in https://developers.facebook.com/apps and I have one Facebook page, in that I have created ads and I got some leads, those leads I can see in Leads Center in respective page.
So I need to retrieve this Leads into my server.
When I run this below API in browser excel file is downloading directly and I can see all my leads in that file https://www.facebook.com/ads/lead_gen/export_csv/?id=XXXXXXXXXXXXX&type=form.
By using my App(which I created in developer) done some setting and I created webhook for user,pages and permission, in permission I can see lead_retrival, ad_reads and I have tested, those tested leads are coming into my server by given webhook URL.
But how can I get my actual leads which is in Lead Center belongs to my page and is there any APIs are available ?
Is APP review necessary to retrieve leads from form or any other option(I tried Zapier but that is not I am looking for).
what I tried:
I am working on my server so I went through with this link PHP cURL to verify Facebook API login access_token on server?, and created all access tokens by my app and I am getting Success. Login is valid
then I did not understand next what I have to do.
Can any one help on it please?
Thanks
Sandeep

Too frequent security alert from Google due to "Unrecognised device" on Angular 7 web app

I am developer and maintainer of an Angular web app which uses Google OAuth. This works normally.
Last week the app users (me including) started receiving standard Security alert emails from Google (no-reply#accounts.google.com) on a daily basis. The Email says "Appname was granted access to your Google account". This is of course bad signal to the users.
When clicked on "Check Activity" in the Email it always says:
Unrecognised device
X hours ago
Unknown (location)
This is the case for all users tested on many different devices and IPs.
Recently I have upgraded from Angular 5 to Angular 7 if that might help.
Also recently I noticed absolutely the same behaviour when I sign-in to Dropbox using a Gmail. The application I am responsible for is not storing session data for privacy reasons so the users are asked to Sign-in with Google every time they want to use the app. I noticed this behaviour just a week ago (devices and locations not recognised) by Google.
The google group (https://groups.google.com/forum/#!forum/oauth2-dev) redirected me to Stackoverflow. Any help is much appreciated! :)
We are sending notifications to users when they approve certain scopes. That list is expanding and more apps will see the notification.
Thanks for the feedback. Looks like the unrecognized device was an issue and we have rolled back that experiment.
Ideally an app should see the notification only once and for non basic scopes (basic scopes being email, profile etc).

API Exception (OAuthException: Cannot call API on behalf of this user)

Got the following exception when calling api (/me) using the latest PHP SDK.
OAuthException: Cannot call API on behalf of this user.
The same exception appears for some facebook account only. Any clue?
I found the source of the problem (on our site, at least). In Facebook's developer console (https://developers.facebook.com/apps), our app was showing an invalid privacy policy. Due to this, Facebook had automatically placed our app into Sandbox Mode.
Updating our privacy policy and (more notably) removing our app from Sandbox Mode caused this error to cease.
Other users seem to have had some success with removing regional (country-specific) restrictions on who can and cannot log in to their app (https://groups.google.com/forum/#!topic/django-social-auth/XaE5dFXEqhA)
Additionally, #Igy's questions sound reasonable and might lead to finding a solution as well.
Best of luck! :)
Is that user's access token still valid? Has the user blocked you? Can you navigate to the user's profile manually? (i.e their profile might be unavailable)