AuthSub Token not working for new YouTube accounts - youtube-api

Is anyone else seeing the following issue?
For older youtube accounts we can request an AuthSub token and upload to those accounts no problem.
For new youtube accounts we can request an AuthSub token, but when we try to upload to that account we get an 'Unauthorized' error
We are planning to eventually migrate to OAuth 2.0, but I'd like to know if this is a known issue

Answering this incase anyone wanders here
Okay I'll file this under 'what the heck'
Turns out even if you load youtube and are signed in via your google ID.... you might not have a youtube account. I had to load 'http://www.youtube.com/create_channel' to create a channel/username to be able to make these API calls.
Why the heck does the login screen return an AuthSub token when the user has no account?!? As far as my user was concerned it looked like they have an account. YouTube loaded with their e-mail at the top and looks like a valid youtube login!
Thanks,
B.

Related

Permission denied on returning captions to YouTube

I have an integration with YouTube to return captions to videos of different YouTube accounts, and I use the YouTube API for this.
The thing is that some accounts are not being authorized to return captions. I made some investigation and I noticed some stuffs:
The oauth app seems to intermittently give an unverified warning to users trying to authorize the application to access their youtube account via api;
Even the users authorizing their accounts, when I try to return the captions I get an unauthorized message;
By digging more, I noticed that the access token had its expiration date to the moment of authorization.
The token is not being refreshed, which should be done by the refresh token, and seems to be not working.
Did someone had problems like that? How did you solved? I already tried to get in touch with YouTube support, but they could not give me a solution or a path to do a better investigation.
I was trying getting in touch with YouTube, but it seems that their technical support only replies on Stackoverflow.
Google saying that the app was not verified
Status of verified application

How to use instagram API for Login

I have been trying to implement the OAuth flow for Instagram login with Instagram official APIs but seems like a lot has changed since June 2020 and I haven't had any luck to get any help for the Instagram Oauth login flow that can return a user email which can later be used to keep track of the user registration via Instagram API.
Instagram official documentation says that they don't recommend using Instagram Basic Display API for login here:
https://developers.facebook.com/docs/instagram-basic-display-api
Can someone guide me on how to get the user information like email or at least username in return from the Instagram API.
Any help will be highly appreciated. Thanks
Unfortunately currently it is not possible to do with IG Basic Display API.
Please check the Documentation
It is not possible to get an email from Basic Display API. You will not be able to get the email from the API responses.
You can get the user ID from Instagram when you will exchange the code obtained via Authenticate to access token. Later on when you will have the valid access token you can get the username.
I would recommend checking out Getting Started from that API: https://developers.facebook.com/docs/instagram-basic-display-api/getting-started it shows how to get user_id (step 5) and username (step 6).

Unable to OAuth with account that owns YouTube channel

I have a google account that I was previously uploading videos to using the v2 YouTube API. This account I guess has two accounts linked to it, because when I go through OAuth flows I have to choose which account.
The 1st account, the one I setup the API in developer console, gives me the option to authorize YouTube API controls.
The 2nd account, the one that actually is the YouTube channel, only says that I'm giving my application offline access, there is no permissions specified relating to YouTube.
I did my OAuth using the 1st account, since that one actually listed youtube permissions. Got my refresh token and added it to the application. However, when I go to attempt to insert a video to YouTube I get the following error:
Code 401 Unauthorized: youtubeSignupRequired
It's as though I'm not linking at all to the YouTube channel account even though they are both on the same Google account.
Has anyone encountered this before?
By the way, I know with certainty that my API calls work properly, as we were able to upload from the dev environment. The dev account is only a single account though that owns the channel on the same account as the API.
I was able to resolve this.
It turned out I needed to do the OAuth with the 2nd account, the one for the YouTube channel. Despite it not requesting any permissions related to YouTube and only getting offline access, I was able to successfully upload using the refresh token I received.
Definitely a case of the most illogical solution being the correct one.

YouTube video insert fails with 401 Unauthorized youtubeSignupRequired

I'm uploading videos to many customers using Google API v3 with PHP client lib, it works for most of them so I guess the issue is not in my code.
For the customers that fail, it always fails, so I believe the problem is with their authentication, however, for these customers I do get categories list with no problem, it's just the video upload that failed.
That made me think it's because of the scopes I used during the authentication, but I used the same scopes for all my customers, those that work and those that don't.
Any idea?
Thanks,
Tan-Tan
A couple of years ago, YouTube accounts changed and became integrated with Google+. After that point, all new accounts were actually Google+ accounts with a linked YouTube channel; however, YouTube accounts that were created before that changeover needed to manually log in and link their YouTube account to their Google+ account. When you try to use the YouTube API to upload a video, if they have one of these legacy accounts that they haven't manually linked, you'll get the error message that you're experiencing.
There's no API call to do the linking for them; so if your app gets that message, you'll have to redirect them to http://m.youtube.com/create_channel and have them link their accounts.

Google Authentication not giving access to YouTube API [images]?

I'm currently working on a YouTube app that will allow users to Log In with their Google Accounts so they can subscribe to other YouTube channels and Like/Dislike videos. However Google doesn't seem to give me access to their YouTube channels even though that option is turned on.
As you can see here the YouTube API is turned on
However when the user is presented to use my App with his account it doesn't ask the user for access to the YouTube channel.
When you look at other applications you can see that they ask for permission for their channel.
Has anyone experienced something similar or does anyone know if I'm doing something wrong :( ?
This looks like a case of your app not passing the proper scope when doing the oAuth authentication. In your code, where your client sets the oAuth scopes, make sure that this is one of the ones you're passing:
https://www.googleapis.com/auth/youtube

Resources