PubNio calls YouTube’s GET /youtube/v3/channels (youtube.channels.list) to identify the signed-in channel and read its subscriber count.
How PubNio calls it
- Connecting an account: after the sign-in that
POST /api/v1/integrations/{provider}/connectorPOST /api/v1/integrations/accounts/{accountId}/reconnectstarts, the sign-in callback makes this call before it saves the account. - Account analytics: the account sync makes this call;
GET /api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}returns what it stored. - At sign-in PubNio asks for
part=snippet&mine=trueand connects the first channel returned. - The channel’s
idbecomes the connection’s subject and itssnippet.titlethe account name. The avatar is thehigh,medium, ordefaultthumbnail, in that order. A response with no channel fails the sign-in. - For analytics it asks for
part=statisticsby channelidand readssubscriberCount; a missing or non-numeric count is left out.
Scopes
- The pinned spec accepts any one of 5 scopes:
https://www.googleapis.com/auth/youtube,https://www.googleapis.com/auth/youtube.force-ssl,https://www.googleapis.com/auth/youtube.readonly,https://www.googleapis.com/auth/youtubepartner, andhttps://www.googleapis.com/auth/youtubepartner-channel-audit. - PubNio’s Google sign-in requests
https://www.googleapis.com/auth/youtube.force-sslandhttps://www.googleapis.com/auth/youtube.readonly, which satisfies it. - Before the account analytics sync makes this call, PubNio checks that the account granted
https://www.googleapis.com/auth/youtube.readonlyandhttps://www.googleapis.com/auth/yt-analytics.readonly.
Errors
PubNio has no YouTube error code pages yet. Provider error codes covers the providers that have them.
Spec and changes
youtube.channels.list in the pinned spec, revision 20261124. YouTube reference: youtube.channels.list reference.
Checked weekly; no change to GET /youtube/v3/channels recorded since this revision. Change tracker.
Limits
- A Google account with several channels connects only the one
mine=truereturns first.