Netflix API Forums

I Need Help!

RSS Feed

Trouble getting AuthURL with Signpost

  1. After almost a full week at this I am ready to abnadon signpost and build a library from the ground up.

    I am using code that I have seen repeated everywhere, and I get an error trying to generate the authURl using signpost.

    [code]
    NetApi.oaconsumer = new DefaultOAuthConsumer(CONSUMER_KEY,CONSUMER_SECRET,
    SignatureMethod.HMAC_SHA1);
    NetApi.oaprovider = new DefaultOAuthProvider(NetApi.oaconsumer,
    REQUEST_TOKEN_ENDPOINT_URL,
    ACCESS_TOKEN_ENDPOINT_URL,AUTHORIZE_WEBSITE_URL);

    //netflix uses version 1.0 only, not 1.0a
    NetApi.oaprovider.setOAuth10a(false);

    try{
    //get url for user to lologin
    String authUrl = NetApi.oaprovider.retrieveRequestToken("flixman://authorized");
    //instantiate browser activity in browser
    Intent i = new Intent();
    i.setAction(Intent.ACTION_VIEW);
    i.addCategory(Intent.CATEGORY_BROWSABLE);
    i.setData(Uri.parse(authUrl));
    startActivity(i);
    }catch(Exception e){
    Log.e("OAuth",e.getMessage());
    }
    [/code]

    At the line that is String aithUrl = .....

    I get an exception based on an IOException with the message
    "Authentication Challenge Provided is Null"

    I have checked my key and secret a dozen times using the walkthrough.

    Any Ideas?

  2. Kent Brewster2 months ago

    I'm not familiar with signpost, but: it seems like whatever you have aliased to "flixman://authorized" isn't responding. I'd try isolating just that call and making sure it was working.

  3. eddiewebb2 months ago

    Nope the callback was fine. The issue was the version of signpost (1.4) don't work with Netflix because it relies on OAuth 0.1a, which Netflix does not yet support.

    Anyone using signpost for Netflix should be sure to use version 1.3.

  4. Kent Brewster2 months ago

    Thanks for the update; you've saved somebody a headache! :)

  5. eddiewebb1 month ago

    Just a correction to my previous post.

    The Oauth Signpost library does not even yet have a 1.3 or 1.4 - I'm not sure what I was smoking for that post :0

    The current version is 1.1 , but you will need to go back to revision 47 if you want it to work with netflix. This applies to the core and httpcommons library (to make posts using apache commons)