cannot access the download url

Questions and discussion concerning archiving

cannot access the download url

Postby idejuan » Wed May 30, 2012 12:20 pm

Hello,

I am obtaining the url to download my video using the "moderator_token".

The url seems well formed, something like this: https://staging.tokbox.com/hl/archive/u ... 8222b63f78

when I access this web, I get the following error: <Errors><error code="403"><notAuthorized message="Invalid credentials passed"/></error></Errors>

In the instructions "Downloading archive videos" here http://www.tokbox.com/opentok/api/tools ... glang=ruby

it does not say that authentication is needed in order to download the url... unless you use the RESTful web service

how do I pass the credentials? is this not a url that anybody could use? how can I create a url that anybody can download?

thanks for your help
Was this post helpful? (0)
idejuan
 
Posts: 10
Joined: Wed May 30, 2012 12:12 pm
Thumbs Up: 0

Re: cannot access the download url

Postby jtsai » Wed May 30, 2012 4:14 pm

When you pass in the that url, you still have to send http headers "x-tb-token-auth" with the value of a moderator token. After that you will get the download link where you can goto in your browser to download the flv.

John
Was this post helpful? (1)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 1976
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 157

Re: cannot access the download url

Postby idejuan » Thu May 31, 2012 12:41 am

thank you John for your help, now I got it right!

Ignacio
Was this post helpful? (0)
idejuan
 
Posts: 10
Joined: Wed May 30, 2012 12:12 pm
Thumbs Up: 0

Re: cannot access the download url

Postby spreeze » Fri Jul 27, 2012 12:27 am

jtsai wrote:When you pass in the that url, you still have to send http headers "x-tb-token-auth" with the value of a moderator token. After that you will get the download link where you can goto in your browser to download the flv.

John

I have got the download link https://s3.amazonaws.com/tokbox.com.sta ... KO7NEZ4N3Q
and the flv do can be download in browser.
but when I download it with java code 403 error occurs "Server returned HTTP response code: 403 for URL:...."
My code is as following
URL url = new URL("https://s3.amazonaws.com/tokbox.com.staging/1551561/fd0ca7ff-5099-4075-98b0-32b69767d3c0/3a13add0-116a-4c93-b8a6-51690a010809.flv?Signature=NcgxSzxi5VfQ%2FE%2Fy4LKPwGWp6GE%3D&Expires=1343295276&AWSAccessKeyId=AKIAI7IKEYKO7NEZ4N3Q");
URLConnection c = url.openConnection();
InputStream is = c.getInputStream();
Was this post helpful? (0)
spreeze
 
Posts: 3
Joined: Fri Jul 27, 2012 12:11 am
Thumbs Up: 0

Re: cannot download flv on server side with java

Postby spreeze » Fri Jul 27, 2012 12:33 am

I have got the download link https://s3.amazonaws.com/tokbox.com.sta ... KO7NEZ4N3Q
and the flv do can be download in browser.
but when I download it with java code 403 error occurs "Server returned HTTP response code: 403 for URL:...."
My code is as following
URL url = new URL("https://s3.amazonaws.com/tokbox.com.staging/1551561/fd0ca7ff-5099-4075-98b0-32b69767d3c0/3a13add0-116a-4c93-b8a6-51690a010809.flv?Signature=NcgxSzxi5VfQ%2FE%2Fy4LKPwGWp6GE%3D&Expires=1343295276&AWSAccessKeyId=AKIAI7IKEYKO7NEZ4N3Q");
URLConnection c = url.openConnection();
InputStream is = c.getInputStream();
Was this post helpful? (0)
spreeze
 
Posts: 3
Joined: Fri Jul 27, 2012 12:11 am
Thumbs Up: 0

Re: cannot access the download url

Postby spreeze » Mon Jul 30, 2012 2:54 am

resovled as following

public static void main(String args[]) throws Exception {

InputStream is = getStream("https://s3.amazonaws.com/tokbox.com.staging/1551561/5119425e-7560-4c30-92c6-83cc200245f6/f59a457d-f0e4-4d9d-a6c7-f9e907ea58ca.flv?Signature=uIpH45%2Fmu6v9ucpm7IcbHrCCmk4%3D&Expires=1343639722&AWSAccessKeyId=AKIAI7IKEYKO7NEZ4N3Q");
File file=new File("d:/test.flv");
OutputStream os=null;
try{
os=new FileOutputStream(file);
byte buffer[]=new byte[4*1024];
int len = 0;
while((len = is.read(buffer)) != -1)
{
os.write(buffer,0,len);

}
os.flush();
}
catch(Exception e){
e.printStackTrace();
}
finally{
try{
os.close();
}
catch(Exception e){
e.printStackTrace();
}
}


}
Was this post helpful? (0)
spreeze
 
Posts: 3
Joined: Fri Jul 27, 2012 12:11 am
Thumbs Up: 0

Re: cannot access the download url

Postby janine » Mon Jul 30, 2012 7:33 am

Thanks for letting us know!
Was this post helpful? (0)
janine
 
Posts: 1570
Joined: Thu May 05, 2011 7:10 pm
Thumbs Up: 19

Re: cannot access the download url

Postby rimple » Sun Oct 21, 2012 11:02 pm

Hey Spreeze,

i want help from you.
when i try to access this "https://api.opentok.com/hl/archive/getmanifest/" + archiveid.ToString()" to get video got an error
"Archive 3fd324e8-e313-4034-a84e-1a6e9b0768ce not found" in production.
so can you please reply asap..?
Was this post helpful? (0)
rimple
 
Posts: 28
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: cannot access the download url

Postby jtsai » Mon Oct 22, 2012 10:29 am

rimple wrote:Hey Spreeze,

i want help from you.
when i try to access this "https://api.opentok.com/hl/archive/getmanifest/" + archiveid.ToString()" to get video got an error
"Archive 3fd324e8-e313-4034-a84e-1a6e9b0768ce not found" in production.
so can you please reply asap..?


Hi there

Could you make sure that the token you are using is valid? You should make sure that it is a moderator token and that the api key matches the one you created the archive with.

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 1976
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 157

Re: cannot access the download url

Postby rimple » Tue Oct 23, 2012 4:54 am

hi John
i would like to know that in my test application video functionality work fine..but in production environment not works proper..
and also like to know that our production support azure...so can you please let me know that there is any problem with azure for opentok or not?
We have follow this https://github.com/opentok/Opentok-.NET-SDK#generating-tokens sdk for video recording..
so can you please give us some guidence/help..asap... :cry:
Was this post helpful? (0)
rimple
 
Posts: 28
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Next

Return to [Beta] Archiving



Who is online

Users browsing this forum: No registered users and 2 guests

cron