How to get current user's profile information in YouTube Data API v3

前端 未结 2 1726
耶瑟儿~
耶瑟儿~ 2021-01-02 07:14

In V2 you could hit the /api/users/default path to get infomation such as the user\'s username. This is documented here: https://developers.google.com/youtube/2

相关标签:
2条回答
  • 2021-01-02 07:55

    In v3, user info is basically channel info. By doing a channels->list "https://developers.google.com/youtube/v3/docs/channels/list", you will get the information under 'snippet.channelId' "https://developers.google.com/youtube/v3/docs/channels#snippet.channelId"

    0 讨论(0)
  • 2021-01-02 07:57

    Youtube API v3 does not support user information any more. Use userinfo API.

    set scope: https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/userinfo.profile (a space between scopes)

    and get: https://www.googleapis.com/oauth2/v1/userinfo?access_token={access_token}

    0 讨论(0)
提交回复
热议问题