The long-awaited Empora API is now in Beta. Anyone wishing to join in the beta of the API, please let me know through the contact form. I’ll then set you up with an API Key and Secret so you can use the API with your account. Note that the API is only available for paid members, so if you need to skin videos on the fly in your program, this solution is perfect for you. Note that there is NO extra cost to access the API, all I need is a request so I can set up your account for you.
In this beta phase, there are 4 apis that you can use. Depending on request, we may add more, but for now this will allow you to do the basics.
- Create Video
- Update Video
- Delete Video
- Get Video List
1. Create Video
JSON Request
Endpoint: https://empora.com/api/{{yourapikey}}/createvideo
Method: POST
The following Payload is the minimum required to create a video. {{YouTubeURL}} needs to be replaced with the URL to the YouTube video. As usual, please only add videos that you own and is not one of a live video, private video or a video that require you to login to view. Unlisted videos are fine. Read this post to ensure that the video you are using complies.
Make sure the skin name and the style name exists. If you have a custom skin you want to use, create it first in your control panel and save the skin name. You can then use this skin name in your API.
{
"apisecret":"{{yourapisecret}}",
"youtubeurl":"{{YouTubeURL}}",
"skinname":"Rotten Tomatoes",
"stylename":"Rift"
}
Other available settings below:
{
"apisecret":"{{yourapisecret}}",
"youtubeurl":"{{YouTubeURL}}",
"skinname":"Rotten Tomatoes",
"stylename":"Rift",
"watermarkimageurl":"",
"watermarkredirecturl":"",
"showcontrols":1,
"showcontext":0,
"autoplay":0,
"limitdomains":"",
"customthumbnail":"",
"showytwatermark":0,
"endredirecturl":""
}
JSON Response
{
"status": 200,
"status_message": "success",
"data": {
"status": "success",
"result": [
{
"message": "Video created successfully.",
"videoid": "{{videoid}}"
}
]
}
}
The video id that you get here will look something like “MjN8MQ==”. In the embed code, make sure you replace the playercode with the video id, see below for an example.
<script type="text/javascript" src="https://empora.com/embed/emporavideo.html?maxwidth=640&minheight=1&playercode=MjN8MQ=="></script>
or if you are using the iframe embed code,
<iframe class="empora-iframe" style="width:100%;max-width:640px;height:360px" src="https://empora.com/embed/?v=MjN8MQ==" frameborder="0" scrolling="no" allowfullscreen="" allow="autoplay"></iframe>
2. Update Video
JSON Request
Endpoint: https://empora.com/api/{{yourapikey}}/updatevideo
Method: POST
Video ID looks something like “MjN8MQ==”.
{
"apisecret":"{{apisecret}}",
"videoid":"{{videoid}}",
"skinname":"Sublime",
"stylename":"Empora"
}
For a full list of possible settings
{
"apisecret":"{{yourapisecret}}",
"videoid":"{{videoid}}",
"skinname":"Rotten Tomatoes",
"stylename":"Rift",
"watermarkimageurl":"",
"watermarkredirecturl":"",
"showcontrols":1,
"showcontext":0,
"autoplay":0,
"limitdomains":"",
"customthumbnail":"",
"showytwatermark":0,
"endredirecturl":""
}
JSON Response
{
"status": 200,
"status_message": "success",
"data": {
"status": "success",
"result": [
{
"message": "Video updated successfully."
}
]
}
}
3. Delete Video
JSON Request
Endpoint: https://empora.com/api/{{yourapikey}}/deletevideo
Method: POST
Video ID looks something like “MjN8MQ==”.
{
"apisecret":"{{apisecret}}",
"videoid":"{{videoid}}"
}
JSON Response
{
"status": 200,
"status_message": "success",
"data": {
"status": "success",
"result": [
{
"message": "Video deleted successfully."
}
]
}
}
4. Get Video List
JSON Request
Endpoint: https://empora.com/api/{{yourapikey}}/videolist
Method: POST
{
"apisecret":"{{apikey}}"
}
JSON Response
{
"status": 200,
"status_message": "success",
"data": {
"status": "success",
"result": [
{
"title": "Sample Video Skin 2",
"videoid": "MzJ8MQ==",
"stylename": "empora",
"skinname": "Rotten Tomatoes",
"youtubelink": "https://www.youtube.com/watch?v=OR3f3j1XImI",
"lastviewed": "2020-09-06 19:59:23"
},
{
"title": "Ayers Rock Sunset Timelapse. No sound.",
"videoid": "MTU1Nnwx",
"stylename": "empora",
"skinname": "Empora",
"youtubelink": "https://www.youtube.com/watch?v=krCfBxylid4",
"lastviewed": "2020-08-14 00:00:00"
},
{
"title": "Jellyfish sample video",
"videoid": "MTU1OHwx",
"stylename": "empora",
"skinname": "Empora",
"youtubelink": "https://www.youtube.com/watch?v=FGWAx_I6CaA",
"lastviewed": "2020-08-26 01:45:47"
},
{
"title": "Sample Video",
"videoid": "MTU1OXwx",
"stylename": "empora",
"skinname": "Empora",
"youtubelink": "https://www.youtube.com/watch?v=3ec8zBP-WTA",
"lastviewed": "2020-08-14 00:00:00"
},
{
"title": "Sample Video Skin 1",
"videoid": "MjN8MQ==",
"stylename": "sublime",
"skinname": "TechSkin",
"youtubelink": "https://www.youtube.com/watch?v=OR3f3j1XImI",
"lastviewed": "2020-09-06 19:59:23"
},
{
"title": "Sample Video Skin 3",
"videoid": "MzN8MQ==",
"stylename": "rift",
"skinname": "SunRise",
"youtubelink": "https://www.youtube.com/watch?v=OR3f3j1XImI",
"lastviewed": "2020-09-06 19:59:23"
},
{
"title": "Sample Video Skin 4",
"videoid": "MTU1Mnwx",
"stylename": "flix",
"skinname": "Youtube",
"youtubelink": "https://www.youtube.com/watch?v=OR3f3j1XImI",
"lastviewed": "2020-09-06 19:59:23"
}
],
"currentserverdatetime": "2020-09-07 01:28:07"
}
}
Any questions, please either contact me or leave a comment.
Comments