OAuth2

Documentation on OAuth2.

OAuth2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service, such as Facebook, GitHub, and DigitalOcean. It works by delegating user authentication to the service that hosts the user account and authorizing third-party applications to access the user account. OAuth2 provides authorization flows for web and desktop applications, and mobile devices.

Apps vs Users

There are two types of tokens that can be used to authenticate with the VtubersTV API: app tokens and user tokens.

App Tokens

App tokens are used to authenticate with the API for app-level actions. These tokens are generated in the developer dashboard and are used to authenticate with the API for actions that do not require user-specific data. For example, fetching a list of all users or fetching a list of all videos.

Apps are rate-limited to prevent abuse. However, apps can be verified to increase the rate limit. Verified apps have a higher rate limit than unverified apps.

Apps have a set of permissions that determine what actions they can perform. For example, an app may have the permission to read user data but not write user data.

The available permissions are:

  • identity: Access your username, avatar, banner, bio, pronouns, and display name. (Public)
  • email: Access your email address. (Public)
  • connections: Access your connections. (Public)
  • access_media: Access your Liked, Disliked, and Uploaded videos. (Public)
  • watch_history: Access your watch history. (Public)
  • profile_edit: Edit your profile. (Private)
  • view_ips: View your IP addresses. (Private)

Private permissions are only available to verified apps. Public permissions are available to all apps.

User Tokens

User tokens are used to authenticate with the API for user-level actions. These tokens are generated when a user makes an account or resets their password. User tokens are used to authenticate with the API for actions that require user-specific data. For example, fetching a list of all videos that a user has liked.

User tokens are tied to a specific user account. They are not rate-limited, they are secure, and they are private.

User tokens contain certain data about the user. The data can be broken down into these categories:

This is an example of a user token:

904ac201acb8af9370fcd79fa03af818d1eb7858264817f5d66a18ccea641856

  • 904ac201acb8af9370fcd: User ID (encrypted)
  • 79fa03af818d: System ID
  • 1eb7858264817f: Random Data
  • 5d66a18ccea641856: 5 Random HEX Color Codes with the # removed and in random order