Hello there!
Our company has Google Workspace (we pay for it). Also we made our own app that works with YouTube API. This app currently is in “Testing” state — which means that its’ token is only valid for 7 days.
I have read in the documentation that a token can be without time limits if:
My app is intended as “Internal” — only for users who work in my company. So I chose the “Internal” type for it. But when I use OAuth, I get an error:
App is restricted to users within its organization. If you think you should have access, you can contact the developer. Learn more about this error
If I get this right, the system “believes” that a YouTube channel (which is created inside the organization) belongs to a user who is not a member of this said organization.
I suspect that because when you create a channel, a user with random email also is created. In our case:
Here comes the fun part: I do not have access to this newly generated email. Meaning I have no idea how to solve this problem.
So my two questions are:
Here are some potential solutions for dealing with unlimited tokens when using the YouTube API:
With some strategic implementation of OAuth, token monitoring, and request optimization, you should be able to overcome YouTube API token limit issues.
I'm not sure about the token issue, but just a thought here on the email. Have you tried to email this random address? I suspect it is a forwarding address to the developer.
Hey, thanks for reaching out!
The thing is, this random e-mail address does not seem to be relevant. It is generated automaticlally for a YouTube channel, when this YouTube channel is created.
In fact, it is impossible to add this newly generated "user" to organization (because there is no actual user behind this address). Furthermore, you can't even send an e-mail to this address (see the screenshot).
As a result, to make an internal app I need all the users to be inside the organization. But also the external user is created when I create a YouTube channel — and I don't have any access to this new user. I don't really have any ideas on how to break this loop.
Hope this clarifies the issue!