Reputation: 3
I am trying to access YouTube data using the YouTube Analytics API through Google Cloud Functions, but I am facing issues with OAuth authentication. The Google Cloud project I am using is under my company's organization. However, the YouTube data I need is associated with my company's account, which is created with a Gmail account, not with our company domain.
I set the OAuth consent screen with the app's publishing status as 'Testing' and the user type as 'External'. My expectation was that this setup would allow me to authenticate and maintain access to the YouTube data. However, it seems that with this setup, the refresh token expires after just 7 days. I am aware that publishing the app requires a review process, but I am concerned about the feasibility of passing this review since we are only using Cloud Functions. I am looking for a way to authenticate with a Gmail account for OAuth without these limitations.
Upvotes: 0
Views: 71
Reputation: 117271
I am trying to access YouTube data using the YouTube Analytics API
To access YouTube data you should go though the YouTube data api. The YouTube analytics api only gives you access to YouTube analytics data. These are two deferent systems.
I set the OAuth consent screen with the app's publishing status as 'Testing' and the user type as 'External'. My expectation was that this setup would allow me to authenticate and maintain access to the YouTube data. However, it seems that with this setup, the refresh token expires after just 7 days.
Applications in the testing phase have their authorization revoked after seven days. Once your application is in production they will stop expiring.
I am aware that publishing the app requires a review process, but I am concerned about the feasibility of passing this review since we are only using Cloud Functions. I am looking for a way to authenticate with a Gmail account for OAuth without these limitations.
You only need to go though the verification process if you are going to be allowing other users to use your app if this is a single user app then you dont need to go though the verification process.
Upvotes: 0