Reconnect accounts for Analytics scopes
If an account was connected before a platform granted analytics scopes, reconnect the account so UniPost receives a token with the new permissions.
When reconnect is needed
UniPost cannot silently add provider permissions to an existing OAuth token. If a platform account was connected before analytics scopes were available, the user must reconnect that account through the same connection mode they used originally.
Workflow
- Check the account status with GET/v1/accounts/{account_id}/health or list accounts with GET/v1/accounts.
- If the account is disconnected or needs updated permissions, send the user through OAuth again.
- For workspace-owned accounts, start OAuth with POST/v1/oauth/connect.
- For customer-owned accounts, create a hosted Connect Session.
- After reconnect, call the same Analytics API again.
TikTok analytics scopes
TikTok Analytics uses the approved user.info.profile, user.info.stats, and video.list scopes. For follower count, the required scope is user.info.stats, and the UniPost API remains GET/v1/accounts/{account_id}/metrics.
YouTube account metrics scope
YouTube V1 account metrics use the YouTube Data API channel statistics endpoint and the existing youtube.readonly OAuth scope. You do not need a YouTube Analytics API scope or a new UniPost API key scope for GET/v1/accounts/{account_id}/metrics. Reconnect only when the stored Google token is invalid, lacks youtube.readonly, or no longer resolves to the expected channel.
YouTube Analytics V2 reports use yt-analytics.readonly and are exposed through GET/v1/accounts/{account_id}/youtube/analytics/summary, GET/v1/accounts/{account_id}/youtube/analytics/trend, and GET/v1/accounts/{account_id}/youtube/analytics/videos. Existing YouTube accounts connected before that scope was granted must reconnect before V2 reports are available.
Common scope map
| Platform | Analytics scopes | Common UniPost API |
|---|---|---|
instagram_business_basic, instagram_business_manage_insights | GET/v1/accounts/{account_id}/metrics | |
| Threads | threads_basic, threads_manage_insights | GET/v1/accounts/{account_id}/metrics |
pins:read, boards:read, user_accounts:read | GET/v1/posts/{post_id}/analytics | |
| TikTok | user.info.profile, user.info.stats, video.list | GET/v1/accounts/{account_id}/metrics |
| YouTube V1 | youtube.readonly | GET/v1/accounts/{account_id}/metrics |
| YouTube V2 | yt-analytics.readonly | GET/v1/accounts/{account_id}/youtube/analytics/summary |
| Facebook Page | pages_read_engagement, read_insights | GET/v1/posts/{post_id}/analytics |