Netflix API Forums

I Need Help!

RSS Feed

Newbie needs help with simple catalog queries

  1. HI, I i'm brand new to the whole api and oauth thing... I am looking for a simple Visual Basic example to perform the following:

    Given a movie name:
    1) Find the movie_id
    2) Get information about the particular movie (durector, actors, rating, runtime)

    At this time I do not desire to access my queue.

    Given a particular movie_id, from what I can tell, I need something like the following:
    http://api.netflix.com/catalog/titles/movies/18704531
    ?oauth_consumer_key=u5yxhmhavqmcbpvcmfb5a3ks
    &oauth_signature_method=HMAC-SHA1
    &oauth_timestamp=1221688587
    &oauth_nonce=348277129172003
    &oauth_signature=bW2LWKaacfvsyB5eU26t652c1K0

    I believe the consumer_key is what I received when I registered, and the sig_method is standard.
    So how I do I generate the timestamp, signature and nonce?

    Any Visual Basic example would be greatly appreciated.

    Thanks!

    Message edited by WannaTheater 3 years ago

  2. ReQuest Inc3 years ago

    The timestamp is just the number of seconds since epoch (01/01/1970). Most any programming language has a way to ask for the current time, and it usually returns either the number of seconds or the number of milliseconds, in which case you'd simply divide by 1000.

    The nonce is a random number that has no significance other than the fact that it has to be different with each request. What I've done is just take an MD5 hash of the timestamp. That seems to work just fine.

    As for the signature, there is ample documentation on this developer site for how to generate the signature. It's a bit wordy and may take some trial and error, but it's not too bad once you get the hang of it. The hardest part for me was getting the proper result after applying the HMAC-SHA1 hash. There are also plenty of working examples in different languages, so you may find one in VB. If I were you, I'd start here: http://developer.netflix.com/docs/Security#jcs-3. That explains how to perform authentication and has some links to examples.

    Good luck :)

    Brian

[ Page 1 of 1 ]