0

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.

Linda Lawton - DaImTo
118k40 gold badges229 silver badges511 bronze badges
asked Dec 25, 2023 at 7:40

1 Answer 1

0

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.

answered Dec 25, 2023 at 16:00
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your assistance. I require access to YouTube Analytics data, hence my interest in utilizing the YouTube Analytics API. I would like to clarify: If I deploy my application to the production environment, will it prevent the expiration issue? Furthermore, can I proceed with deploying to production without undergoing verification, provided that the application is intended for single-user access with a specific Gmail account?"
You need to click the send to production button in the consent screen on Google cloud console for your app. You do need to be verified. youtu.be/4Szy-tL2g0Q?si=cB_lgMTkZy-TIQw9

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.