I want to create a web application that allows the users to upload videos to a specific YouTube account. The users do not have gmail accounts and they have to access YouTube via one login. Is there a way for me to achieve this without having the users to login to the Google account.
I have tried the samples provided by the YouTube API. These first show the Google+ log in screen for the users to enter the credentials. What i want, is for the application to login, without the users knowing it. Is it possible to implement a way for the application to signin to the account without its users realizing it. Please provide me with a soution. So far I have tried the YouTube JavaScript API.
Thank you in advance!
YouTube is dependent on gmail emails now. They switched a while back.
You should be able to have them login once, and then your application could remember their login.
YouTube's authentication is going to need them to login so the OAuth token can be handed off.
Related
I'm working on a Wix website where users can connect their social media accounts and have data from them displayed on their profile pages.
Currently, the form just asks them to input their social media URLs. Obviously, this is a problem, as there's no way for to verify that these accounts actually belong to them. How can I have them sign in to their social accounts to have them verify that they own the accounts from within the sign-up form?
Currently I'm having them connect their YouTube, Twitch, Instagram, and TikTok accounts. I imagine there's some kind of OAuth solution, but I just don’t know what. It is critical to the function of the site that we are 100% sure the connected accounts are correct.
You don't do it in Velo unless you have a very specific reason.
The Wix ADI natively supports it (refer to here).
And as for other things like TikTok, that can be done by writing Node.js backend code:
I'm building a web application that allows a specific user to upload videos to a YouTube account through the use of the YouTube API. The uploading of videos will be done by only one person & videos will be uploaded only to one account. If the YouTube account is already authorized by the app to manage the channel etc, how can I setup the application in such a way that the user bypasses the authentication/login screen every time he/she needs to upload a video? (That is when the user exits and re-enters application.)
While reading, a solution I stumbled upon a solution which was to use a refresh token but I don't know how to integrate it with the code I have currently. The code I'm using is the one available on the Google Developers site, link below.
https://developers.google.com/youtube/v3/code_samples/javascript#upload-a-video
Please note that I've gone through & read all similar questions on this forum but none provides Javascript help/solution.
Normally i would say that you should use a service account which would allow you to preauthorize the access to YouTube. However the YouTube API does not support service accounts so your going to have to do it the hard way.
You will need to authenticate your application once and save the refresh token. Then you will be able to use the refresh token again later to get a new access token. You will have to watch this application refresh tokens can expire its rare but it can happen so you should have something set up that will allow you to quickly reauthenticate it and save a new refresh token.
To my knowledge it is not possible to get a refresh token with JavaScript your going to have to use a server sided language like node.js for example. This tutorial should show you how to get offline access with node js. Node.js Quickstart
I am using javascript sdk to authenticate google. In my webapp I am trying to upload video to youtube.
A youtube account might have multiple channels and I want to select the channel and send the information to the server with access token and all required value to upload a video.
I can authenticate a user from google but how can I display the youtube channel selection ui and also if there is no channel in the account I want to show error.
I have gone through youtube api but I found it very complex
Need help
YouTube is very different from other Google APIs. When your user authenticate your application they are not just authenticating you to YouTube you are actually getting authenticated to a single YouTube channel.
If you want to see the account selection you are going to have to force them to re authenticate you will then get a new access token associated to the channel that they pick.
prompt=consent should force them to re-authenticate but that depends on how you have implemented things.
Recap:
If a user has 5 channels you will to authenticate them once for each channel you will then have five access tokens each of which grants your application access to a single channel.
I am working on my first chrome app and am trying to learn by digging through some of the sample apps. Right now I am working with the gdrive app (https://github.com/GoogleChrome/chrome-app-samples/tree/master/gdrive).
The README says that this app "uses the chrome.identity.getAuthToken() API to perform OAuth2 and access the Google Drive API."
When you authorize the app, a screen pops up confirming your authorization and in the top right corner it has the email you are trying to sign in with (johndoe#gmail.com).
I want to save "johndoe#gmail.com" as a string so I can display it when the user is logged in.
Does anyone know how I would go about doing that? I am fairly new to using these APIs, so I am a bit clueless.
Thanks!
It's pretty easy to display the name that the user probably wants you to display ("Eric Austin" in your case). https://github.com/GoogleChrome/chrome-app-samples/tree/master/identity demonstrates how to do this. Look for the displayName field in the personal data response.
If you really want to display the user's email address (and take the risk that many users will decline to give your app access to their contact information), check out Google's OAuth2 docs and follow the steps to obtain the id_token listed in Step 5.
I am successful in implementing Facebook API and Google+ API. I don't haven any issues with login or logout. Even when page is refreshed information is working fine.
But when user logs into Google+ and Facebook in different tabs and he provided access to the app by login with both accounts then I am seeing both images.
How can I avoid this. On page load, I would like to see only either Facebook or Google+ but not both.
If Facebook login then show only Facebook
If Google+ Login then show only Google
If he is logged in to both then show only one of them.
This just out, how to do both:
One of the key parts is the concept of identities vs users. A user represents a human, an identity represents a human logging in with a particular social network. Data security is done on users, showing photos and whatnot is done on identities.
The first code snippet shows some pretty simple logic for deciding which login provider to use if a user is logged in with both.
https://developers.google.com/+/best-practices/facebook#separating_social_and_business_logic
Only allow them to associate their Google+ or Facebook accounts, not both. If one is associated, then do not allow the other.