I'm trying to use Dailymotion api for create Live stream. But it does not work with publish parameter.
{"error":{"more_info":"https://developer.dailymotion.com/api#error-codes","code":400,"message":"Invalid parameter publish' forPOST /videos'","type":"invalid_parameter"}}
Sorry there is a typo in the documentation, the right name of the field is 'published' instead of 'publish'.
We will quickly fix the documentation.
Thank you for your feedback.
Related
I have created a new google account, then I have enabled youtube live streaming and started to stream. I have app key and access token for my user, but http get request to https://www.googleapis.com/youtube/v3/liveStreams?part=snippet&access_token=MY_TOKEN&key=MY_KEY&mine=true is returning zero results, meanwhile at the moment I have live stream.
What to do?
Try using LiveStreams.list instead. It returns a list of video streams that match the API request parameters. There's an example for your code reference.
I found the saving clue in this SO answer. To receive the list, one has to explicitly provide the broadcastType parameter to the query.
Acceptable values are:
all – Return all broadcasts.
event – Return only scheduled event broadcasts.
persistent – Return only persistent broadcasts.
If you find this answer useful, please make sure to upvote the linked answer (as well). I just copy-pasted this.
So I was trying to use the LiveChat API from youtube, At the end I got into using this post:
https://www.googleapis.com/youtube/v3/liveChat/messages?access_token=MYACCESSTOKENHERE&part=snippet&messageText=lalala&liveChatId=0bksQfFVZW4
Now it tells me that it can't find the liveChatId, Any reason why?
liveChatId property is associated with liveBroadcast. So try making calls to any of the liveBroadcast methods . A successful response includes the liveChatId property. Don't forget to specify 'snippet' as the 'part' parameter. Also, you'll be required to use OAuth Authorization when calling these methods.
My company runs a live web stream and has started duplicating this to YouTube. Unfortunately the staff won't check if it's live and internet issues cause our web encoder to stop encoding at times.
Is there a programmatic way I can tell if a channel is ACTUALLY streaming? i.e. if live video is coming out the channel and not just that "the channel is live"?
You may use Search: list.
Using this request returns a collection of search results that match the query parameters that you have specified in the API request. Add part=snippet in your request since this is a required parameter. Then, you may add the following optional parameters with their corresponding values in your HTTP request:
channelId=[channelId] - to search resources created by a particular channel.
type=video - to retrieve a particular type of resource
eventType=live - to return only active broadcasts. Please note that if you use eventType, also set the type parameter's value to video.
Combining all of these parameters, you may send HTTP request using the following format:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCXswCcAMb5bvEUIDEzXFGYg&type=video&eventType=live
To better filter your search, you may also opt to add more parameters that are listed in supported parameters.
Lastly, solution in this related SO post - How to check if YouTube channel is streaming live might also help.
I am trying to make a certain request work via the Dailymotion API, for work. Our client is a Dailymotion Partner who asked us to do 2 things from our application :
Generate a XML file to MRSS-upload their videos on Dailymotion (but we do not do the actual uploading, only the XML file creation)
Later, once they have uploaded their video, we have to get its Dailymotion ID (for logs necessities).
The thing is that this process has been developed circa 2012, and not fully tested. My job today is to make sure the process works now for good. In order to get the ID, we have been using this request:
https://api.dailymotion.com/video/PARTNER_NAME:GUID?fields=id
but I can't find any mention of "partner" and "guid" in the Dailymotion Documentation today. All I know is that we use the name of the channel as PARTNER_NAME and the guid we put in the XML file as GUID.
The thing I don't understand is that:
sometimes, the request does succeed and I get the ID,
most of the time, I get alternatively "400" and "403" errors from the API.
First, I tried to set the attribute "private" in the XML file to 'false', and it helped get the ID of some videos imported as public, but it does not do the trick for all videos.
Could someone show some light on this matter?
I need to get the video/playlists/show data from youtube.com.
Example :
http://www.youtube.com/channel/SWMb9NxQL9I6c
http://www.youtube.com/show/mtvroadies9/featured
Is there a way I can get the video details for the above URL using the youtube API?
Yes, using:
https://developers.google.com/youtube/v3/docs/channels
e.g.
https://www.googleapis.com/youtube/v3/channels?part=snippet&id=SWMb9NxQL9I6c&key={YOUR_API_KEY}
You need to look at the YouTube Data API. You will find there documentation about how the API can be accessed. You can also find client libraries.
You could also make the requests yourself. Here is an example URL that retrieves the latest videos from a channel :
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20"