Adds a subscription for the authenticated user's channel.
In the Subscription request body, snippet.resourceId.channelId is required to identify the channel to subscribe to (omitting it or passing an invalid channel ID returns 404 publisherNotFound), and part must include snippet. If specified, snippet.channelId must match the authenticated user's channel ID. The authenticated user must have a verified email address. YouTube doesn't persist contentDetails.activityType; new subscriptions always include all public activity.
For method-specific error responses, see subscriptions.insert errors. For code examples, see subscriptions.insert code snippets.
HTTP request
POST https://youtube.googleapis.com/youtube/v3/subscriptions
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
part[] |
Required. The Valid values are |
Request body
The request body contains an instance of Subscription.
Response body
If successful, the response body contains a newly created instance of Subscription.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtubepartnerhttps://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.