Fetch video details on Youtube using API v3 in PHP

后端 未结 1 939
情深已故
情深已故 2021-02-03 11:48

How can I fetch video details from Youtube via API v3 in PHP? I need help in getting started with this. I tried this tutorial already but it\'s not working. http://www.w3resourc

相关标签:
1条回答
  • 2021-02-03 12:08

    ref. https://developers.google.com/youtube/v3/docs/videos/list

    You can request from your server as below.
    https://www.googleapis.com/youtube/v3/videos?part=snippet&id=XS6ysDFTbLU&key=XXX

    XXX is your API key.
    If you don't have your API key, you should access Developer Console, and you get API key.
    http://code.google.com/apis/console#access
    [APIs & auth]-[Credentials]-[Public API access]-[Create new key]-[Server key]
    You should set global IP address of your server in "IPS".

    If you want to call API from client, you should use [Create new key]-[Browser key] and set your URLs in "REFERERS".

    If your question is "I can get data, but I can not parse response.", see documents of library.
    https://github.com/google/google-api-php-client

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