Youtube API Integromat testing app - connection getting disabled - google-cloud-platform

I don't have much idea about API but I managed setup Youtube API so that I am able to use Integromat workflow between Youtube and Airtable.
It works fine.
The issue I have is the connection between my Youtube API at Integroat is getting disconnected after a few days / weeks and have to re-verify(reconnect) to Google account again.
The Youtube app was setup properly (as instructed by Integromat) and as I said it works..... it's grabbing URLs of new Youtube videos on my Youtube channel and it is pushing those URLs into Airtable.
Now have even added mysef now as the user of the app. Wasn't listed as the user there (1 out of 100). Could that be the reason?
The Youtube API is setup as a test-app. Is that the reason for the disconnects at Integromat?
Do Ineed to request Google to have the app verified? Or can I continue with the app being a test app? (Because it says it hasn't been verified).
I don't know much about what I am doing but it sees working fine for me so I guess I managed to set it up OK except for the one issue with connection loss.
Pic:
The 2nd and 3rd item on the 2nd picture is for the Youtube API connection... and that is where I am being asked every now and then by Integromat to reconnnect the connection.. then I need to login and Google wanrs me my application wasn't approved so I pick continue etc...

The issue I have is the connection between my Youtube API at Integroat is getting disconnected after a few days / weeks and have to re-verify(reconnect) to Google account again.
This is because your authorization has an expire time. Access tokens by default work for one hour. If you want your application to refresh its access then you need to request offline access and store the refresh token and then use that to refresh your access whenever you need it.
On unverified apps refresh tokens will expire after a very short time this is because your application is considered to still be in development. YOu should apply for verification when you are ready to go to production. until that time you will need to login again regularly but as you are in development this sholdnt be to much of a problem.

Related

OAuth Re-Auth Frequency Changed for Google OAuth

I've been using
https://github.com/tokland/youtube-upload
to automate uploading of videos to YouTube, no other processes share the auth session, this process is the only one using the credentials. I've been using this for years however more recently, within the last couple months, it seems like the OAuth session keeps expiring on me almost on a weekly basis. This would break my automation and I have to re-authenticate weekly.
No updates were done to the script prior to this issue starting. Is anyone aware of any changes Google had made that may have cause this new behavior to happen?
The reproduction is as follows:
Have sufficient route to upload videos onto YouTube API
Use https://github.com/tokland/youtube-upload to upload videos to YouTube
When executing youtube-upload, it will prompt for OAuth2 authZ code, enter the code after visiting authZ webpage
Automate the uploads (~30 videos per day)
After a week, OAuth authZ session will expire and re-authZ will be required
OAuth session keeps expiring on me almost on a weekly basis.
From oauth2#expiration:
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
If your app is still in the testing phase your refresh token will expire every week. You need to set your application to production in google cloud console under the auth consent screen.

Google Cloud API Services Oauth with a Testing App

I have a small personal-use only app that logs into a [throw away] gmail account to pull out an auth-token so it can then run a scheduled job (turning on/off my home cameras). Its dead simple and works, except that the app is in GCP TEST mode and it looks like the gmail auth expires in 7 days.
I highly doubt based on the below requirements that I can promote the app, and I dont want to publish it regardless. I tried GCP Support and wound up here. Im sure Im not the only person that has dealt with the 7 day expiration on a personal project. Any ideas?
If you check the documentation for oauth2#expiration
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
The key hear is setting your project into production.
What you are showing in that image are requirements for application verification. You shouldn't have to go though verification for a single user app.
Try just setting it to prodcution and then wait a week and see if it still expires. It shouldn't
I highly doubt based on the below requirements
Unfortunately with the new security restrictions. I wouldn't doubt anything these days. They keep changing the rules.

Google Cloud app verification step: Your app will be available to any user with a Google Account? What does it mean?

I have created a Youtube API application to enable access to Youtube API for Integromat. All my Youtube API application does it gives access to my Youtube channel videos for Integromat. Integromat grabs the links to videos and uploads the links to my Airtable. So the only user for the Youtube API is going to be myself and my own Integromat workflow.
The Youtube API app is in development. I want to verify the app to get rid of the 1-hour deactivation of the authorization (Integromat connection to Youtube API breaks after 1 hour).
To get verified, I looked the steps here https://support.google.com/cloud/answer/7454865?hl=en. The first step it tells me to do is "Update the OAuth consent screen details" and I go to that screen and shows the publishing status. Do I click to "publish to production"?
When I click that, it tells me:
Your app will be available to any user with a Google Account.
Screenshot showing the step to publish my app
That's sounds scary. What does it mean?
I do not need (nor want) have other users logging to my Youtube API. I am the only user and Integromat is the only app that will access the Youtube API.
I am novice in this and don't have much idea about programming so I don't even know what questions I should be asking here.
Thanks.
Here are more details about what I am trying to do in Integromat:
Youtube API Integromat testing app - connection getting disabled
It means that you will be able to share your app via that link with anyone you please. The whole point of an API is that it's available publicly, at least on a technical level. Whether you're actively soliciting users is an entirely other matter, naturally.

Facebook API page feed didn't send information to my webhook?

I'm admin of my test app, and my test page.
Now I'm doing a function get page's feed realtime by webhook, just only on development mode.
When I click test button on App's Dashboard, It has been sent to my webhook. But when I comment or like ... the post, facebook doesn't send even though I subscribed feed webhook.
With Messages, it has been sent successfully, but Feed doesn't.
I ask facebook support, so they said that:
"Applications will only be able to receive test webhooks sent from the
app dashboard while they are in development. No production data,
including that of app admins, developers, and testers, will be
delivered unless the app is live. In order to receive feed webhooks,
your app needs to be live and has to go through app review for
necessary permissions."
I understand that I can not get data from facebook even though it is under development mode.
So how can I get data returned by facebook to develop, test... apps in development mode.
Thanks so much.
It is not possible to run this service without an app review, since it is not possible to add the 'mange_pages' permission to a (test-)user within a development app. At the same time it is not possible to turn a testapp into live-mode. As the same is true vice versa the only solution is the app review to get information from a specific (test-)page.
For live testing i suggest to create a testuser and subscribe for information about the "user" to test your webhook.
You can check with GET graph.facebook.com/app-id/subscriptions, if your app is successfully subscribed to "page information". Graph API Documentation
As you already mentioned you can also send "page information" test calls to your endpoint.
UPDATE 18th Nov 2018
If you go to Webhook -> pages in your App Dashboard on https://developers.facebook.com you are able to notice, that Webhooks in dev mode do not work.
I've submitted a Bug report to Facebook for this issue, as there is no proper solution.
You can check it at : https://developers.facebook.com/support/bugs/1570460936387604/
I also don't get the fact that you can't test webhooks in dev mode, and you can't do the app review because you can't develop your app and show them for review.
Just a chicken and egg issue.

FB Graph API - cannot enter with my own App token

i facing an issue regarding the FaceBook Graph API.
actually a friend of me, have an FB App whitch can be used for the Graph API.
But in that case I activate a FB dev APP for myself, i'm not able to generate a valid security Token with the App-ID and App-Security.
At first the App is live and activated. For that I don't understand the error message at the end.
Second I don't want to have a User-Token with a validation for an hour.
These are the step's i following:
getting App Token
https://graph.facebook.com/oauth/access_token? client_id=20179479xxxxxx&client_secret=3048xxxxxxxxxxxxxxx&grant_type=client_credentials
The result i'm receving:
"access_token": "20179479xxxxxxx|Pqxxxxxxxxxxxxxxxxx",
Now if im trying to use the Graph API Explorer and trying these token as authentication, I'm facing an #200 OAuthexception
my request:
Get -> /v2.12/coca-cola
"(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/",
Have somebody any ideas how to solve or what i'm missing here?
With the Security Token from my friend he can use the example with coca-cola from the developer like in the documentation and example from FaceBook as well.
Thanks in advance
Facebook is changing the API due to a security issue. This means new apps have more restrictions and less access (for the minute) than apps that were already registered and using the API, probably why your friends key works. Seen as your app is either new or hasn't recently accessed the data you are requesting, you currently cannot fetch it.
Its not known what features will be removed from the API following this incident - as a result I wouldn't come to rely to heavily on any feature the API offers.
Im hearing that the ability to retrieve events could either be removed or the data you can access from an event is going to be severely limited, however thats not from any official facebook source. All apps will be subjected to a review according to this official facebook post, before they are granted access to the Events API, Groups API, and Pages API.