The page has been marked as outdated. This generally means that the page was written for either a previous version of the package or a previous version of the underlying API(s).


The YouTube API defines a few scopes. Each scope will define the permissions your app will have to the account of the authenticated user.

Skybrud.Social Name Description
YouTubeScopes.Manage Manage your YouTube account.
YouTubeScopes.Readonly View your YouTube account.
YouTubeScopes.Upload Upload YouTube videos and manage your YouTube videos.
YouTubeScopes.PartnerChannelAudit Retrieve the auditDetails part in a channel resource.

In addition to the scopes listed above, Google also also has few global scopes.

Working with scopes in code

Scopes for the YouTube API are implemented by the YouTubeScope class, which again inherits from GoogleScope. A list of known scopes are available through either the YouTubeScopes or GoogleScopes classes.

When setting up the code for an authentication page, you must specify the scopes through an instance of GoogleScopeCollection. There are a couple of different ways to create an instance of this calls, so see the snippet below for examples:

// We can initialize a new collection based on one or more scopes
GoogleScopeCollection scopes1 = new GoogleScopeCollection(GoogleScopes.Email, GoogleScopes.Profile);

// We can also initialize a new empty collection, and then add scopes manually
GoogleScopeCollection scopes2 = new GoogleScopeCollection();

// Add scopes one by one

// Remove the "email" scope if contained in the collection
if (scopes2.Contains(GoogleScopes.Email)) {

// Or just remove a scope without checking first

// With help of operator overloading, initialize a new collection from a single scope
GoogleScopeCollection scopes3 = GoogleScopes.Profile;

// Also with help of operator overloading, two scopes added together results in a new collection
GoogleScopeCollection scopes4 = GoogleScopes.Profile + YouTubeScopes.Readonly;