Brad Dougherty

Brad Dougherty Staff

Hi Sonal,

Looks like there is a Perl OAuth library available on the OAuth site:

Please note that we can't really help you with OAuth unless it is a specific problem with Vimeo's implementation or in regards to our API. There are lots of OAuth resources available on the internet that will do a better job than I can anyway.

sonal agrawal

sonal agrawal

Thanks for reply Brad, but still I am not able to get the videos.
here is my code:

my $key = XXXXXXXX ;
my $method = "" ;
my $oauth_nonce = rand (9999999999999999 ) ;
my $timestamp = time ;
my $query = "nike" ;
my $secret = YYYYYYYY ;
my $url = ""; ;

my $str ="method=$method&oauth_consumer_key=$key&oauth_nonce=$oauth_nonce&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$timestamp&oauth_version=1.0&query=$query";
$str = uri_escape( $str) ;

$url = uri_escape( $url) ;
my $base_str = "GET"."&".$url."&".$str ;
my $secret_key = $secret."&" ;

my $hmac = Digest::HMAC_SHA1->new( $secret_key ) ;
$hmac->add($base_str) ;
$oauth_signature = $hmac->b64digest ;

which generates the signature as : Std2IYZywe1D/y6YXpBM6k3EZIY

after encoding signature is : Std2IYZywe1D%2Fy6YXpBM6k3EZIY

my call url is:"";

but I am getting the error says:
expl="The oauth_signature passed was not valid." msg="Invalid signature"

Please let me know where am I doing wrong.

I have also tried with
my $request = Net::OAuth->request('consumer')->new(
consumer_key => $key,
consumer_secret => $secret,
request_url => '';,
request_method => 'GET',
signature_method => 'HMAC-SHA1',
timestamp => $timestamp,
nonce => $oauth_nonce,

my $oauth_signature =$request->sign ;

which gives the signature as: ZBFl7jXD4BFGTexcZ4Cj2edf3Zw=

after encoding signature is :ZBFl7jXD4BFGTexcZ4Cj2edf3Zw%3D

and my request url is :

here also I am getting the same error msg saying : expl="The oauth_signature passed was not valid." msg="Invalid signature"

can you tell me what's wrong with my url below, I got same error

This conversation is missing your voice. Please join Vimeo or log in.