Get secret URL via api? (back)
jmires (1 month ago)
Hi there,
I'm using PHPViddler with PHPViddlerUploadify (http://code.google.com/p/phpviddleruploadify/).
Is there a way to get the secret URL (or at least the relevant code at the end of the URL) from the api when uploading a video?
It doesn't appear that the PHPViddlerUploadify UploadToViddler() method accepts an argument related to secret URL.
I'm wondering if I can use PHPViddler's video_setdetails() function (which uses viddler.videos.setDetails method) with the view_use_secret argument? Will the returned array include the actual secret URL? And can I even use setDetails immediately after uploading the video via api, or do I need to wait until encoding is finished?
If it can be done this way, I'd be grateful for some guidance / syntax help on how to set up the array passed to PHPViddler's video_setdetails() function to accomplish this. Specifically, I believe that array must include the api_key, sessionid, and video_id as the first three arguments, but how to handle all the optional arguments that I don't need?
Many thanks in advance for any assistance!
cdevroe staff (1 month ago)
jmires: You can use set_details to make the video private and to force a secretURL to be generated. Then, getDetails to get that information. Here is the workflow (although PHPViddler may not support this out of the box, you can always create a method within it and share it with the community)
1. Call setDetails with the following parameters: video_id=theVideoID, view_perm=private, and view_use_secret=1.
2. Call getDetails and look for video->permissions->view->secreturl.
In PHPViddler, since video_setdetails() accepts an array, you may send those arguments as array items. If you have any questions beyond this, let me know.
Thanks for the question and for using Viddler!