Netflix API Forums

API Forum

RSS Feed

OAuth Issues with exchanging my request token for an access_token

    • raghus
    • Topic created 3 years ago

    I keep hitting this error: Net::HTTPServerException: 404 "Not Found".

    I am using the Ruby gem rares-oauth for connecting to the Netflix API and have had no issues for the past 4 odd months. Is this somehow related to the OAuth vulnerability fix? I read the other thread on the forum here and it seemed like the only changes were at Netflix's end - we (consumers) did not need to make any changes but can someone at Netflix clarify?

    Thanks,

    Raghu

    Message edited by raghus 3 years ago

  1. raghus3 years ago

    I tried to login to qflip.net as a regular Netflix user - and it looks like that site is also having errors : http://qflip.net/

  2. Wile E Coyote3 years ago

    Im running into the same issues. I can view my queue's, but if I try to add or delete anything from the queue's I get the 404 error. I think NetFlix may have disabled queue modifications until the get the issue resolved, but I'm not sure....

  3. raghus3 years ago

    Wile - can you try to re-authenticate to your App via the Netflix API/OAuth step and see if it even succeeds. If you let me know the URL of your app, I can try it as a Netflix user and see what happens

  4. Wile E Coyote3 years ago

    Raghus,
    I was able to re-authenticate. I am able to view my queue's (DVD, Instant, History & recommendations.) The only thing I cant do is move, add or delete anything in my DVD & Instant queues.

    I dont have a URL for my app, it is a third party plugin called My Netflix for MediaPortal.

    Also, Im using the WrapNetFlix wrapper for .NET to do my authorization and calls to the NetFlix API's.

  5. John McLaughlin3 years ago

    I'm getting the same '404 not found' error on an app that has worked flawlessly -- I can't even re-authenticate

  6. raghus3 years ago

    Wile - thanks for checking on that. I am surprised it works for a re-authenticate. That's good for you but I am now not sure what could be wrong...

    John - exactly my experience. If you have a URL for your app, I can try it out and see and report back.

    Raghu

  7. mikey3 years ago

    So the only OAuth related changes that we made were to change the TTL on the request token to 5 minutes and to add messaging to the login page. We didn't disable queue modifications ,but we did push out a new version of server on Friday. I suspect we probably broke something related to posting and deleting (which is entirely possible since I was doing some refactoring in that area) However, checking a few applications, they all seem to work fine. (PhoneFlix, NowPlaying).

    Only thing I am seeing (from glancing at log files just now) are a bunch of invalid title and series calls.
    Do all adds and deletes fail? Can you post an example of a movie that is failing, or any other info?
    Thanks.
    Sorry about these issues!! We'll get to the bottom of this

    =-mikey-=

  8. mikey3 years ago

    IF some of these oauth libraries grab a request token well before the authenticate, I could see a possible timeout issue or inability to authenticate.

    Just a thought..

    =-m-=

  9. John McLaughlin3 years ago

    Hi Mike

    I grab the request token maybe 5 seconds before authentication (if that) -- I have a fairly complete dump of what I'm doing and what is being returned, can I send you anything to help sort this out?

    Just to be clear the app was working just fine but when I have to re-authenticate (as if you are going in for the first time) it stopped working -- last Night I tried PhoneFlix and it wasn't working either but this morning it was fine -- My App (MovieFlick) is still not working....


    -John

  10. raghus3 years ago

    mikey - existing tokens and secrets work just fine. But when I try to re-authenticate it fails. I can access the data for 1000s of users but if someone tries to re-authenticate then he's out of luck.

    Also wrt TTL, I only get the request token seconds before I try to swap for the access token - which fails. So atleast for my app, i can confirm that TTL is not an issue.

    Thanks for investigating this over your weekend!

  11. raghus3 years ago

    Also here's an extract from an email exchange I've been having with Rob Ares - the author of the Ruby OAuth gem that I've been using successfully all along:
    =======
    The root cause indicates that it can't reach the oauth access_token enpoint (http://api.netflix.com/oauth/access_token) but when i put that in the browser, i reach it fine.
    =======
    I hope this helps you to debug.

  12. John McLaughlin3 years ago

    Hi Mike,

    Here is a debug log of my login attempt -- the date/time stamps are shown for each log (I've xxx out my consumer key but otherwise left it unchanged) -- The 'Authorization = ...' output is a HTTP header for the request listed above and the 'response' line is the body response of that statemet.


    2009-04-26 08:41:21.466 For request <OAMutableURLRequest http://api.netflix.com/oauth/request_token>
    {
    Authorization = "OAuth realm=\"\", oauth_consumer_key=\"xxxxxxxxxxxxxxxxxxxxxx\", oauth_signature_method=\"HMAC-SHA1\", oauth_signature=\"ZNzFjoGohxhW6lfZJ6JYWCRtU14%3D\", oauth_timestamp=\"1240760481\", oauth_nonce=\"1CB61885-A80E-46F4-8461-0010F12B2ACF\", oauth_version=\"1.0\"";
    }
    2009-04-26 08:41:21.467 MovieFlick[35449:4007] Request Ticket response =
    oauth_token=sgwgcry5zp75cy66j7ttp9bz&oauth_token_secret=JeWcm9xjv6tK&application_name=MovieFlick&login_url=https%3A%2F%2Fapi-user.netflix.com%2Foauth%2Flogin%3Foauth_token%3Dsgwgcry5zp75cy66j7ttp9bz
    2009-04-26 08:41:21.469 Going to let the user login at this address https://api-user.netflix.com/oauth/login?application_name=MovieFlick&oauth_token=sgwgcry5zp75cy66j7ttp9bz&oauth_consumer_key=xxxxxxxxxxxxxxxxxxxxxx&oauth_callback=http://loghound.com

    2009-04-26 08:41:30.376 For request <OAMutableURLRequest http://api.netflix.com/oauth/access_token>
    {
    Authorization = "OAuth realm=\"\", oauth_consumer_key=\"xxxxxxxxxxxxxxxxxxxxxx\", oauth_token=\"sgwgcry5zp75cy66j7ttp9bz\", oauth_signature_method=\"HMAC-SHA1\", oauth_signature=\"jf4d78m6NgAeD90FgJ3pm5b8At4%3D\", oauth_timestamp=\"1240760490\", oauth_nonce=\"3D6B448D-260B-4341-8358-7B8026FF9140\", oauth_version=\"1.0\"";
    }
    2009-04-26 08:41:30.377 Access Ticket response =<?xml version="1.0" standalone="yes"?>

    <status>
    <status_code>404</status_code>
    </status>

  13. Wile E Coyote3 years ago

    @mikey,
    I tried to add a movie 'Good Luck Chuck' to my queue directly from the WrapNetflx project, and I get this error - "The remote server returned an error: (404) Not Found." I have been receiving this error since the change...

  14. Wile E Coyote3 years ago

    @mikey,
    Here is the request from WrapNetflix to add the movie Good Luck Chuck...(I have removed the consumer key)

    http://api.netflix.com/users/T1IKR1vLATlctw_XwFG_KlWPrd2iXQFa26n0hyvj3VbeA-/queues/disc?oauth_consumer_key=XXXXXXXXXXXXXXXX&oauth_nonce=2014190&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1240762343&oauth_token=T1d6nWr.kr4L1gbOYen_3ZmHS8wm7BgS4b0yDKMK4LqnWSQlzsDJ43HPHZtd3c67BITwDP76NDzogTtojBXgpZfQ--&oauth_version=1.0&title_ref=http%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F70065112&oauth_signature=N1dtxYTIVqj3gx0AKnMhgLyhrsc%3D

    My application is MyNetFlix.

    I also want to thank you for taking time this weekend to help us out with this issue!
    Wile E.

  15. mikey3 years ago

    Wile, is that with all movies, or just some??
    Also can you send a sample request??
    thanks!!

    =-mikey-=

  16. John McLaughlin3 years ago

    @mikey see my post a few up also -- I included a fairly detailed dump log (and I can get you whatever else you need also)

  17. mikey3 years ago

    So, from what I can gather, I think there may be an issue with POST and DELETE in general. I think they symptoms you are describing and from the example urls, I think this makes sense. I recently refactored code related to REST verbs, and I probably broke it (and I generally test using the get overrides). I will get this fixed ASAP.

    =-mikey-=

  18. Wile E Coyote3 years ago

    Mikey,
    Yes, that is with all movies, I have not found one yet that works :(

    Thanks for your help!
    Wile E.

  19. John McLaughlin3 years ago

    Hi Mike

    I usually use 'POST' (I think I always use 'POST') so that would explain it well -- I really appreciate you working on this on a Sunday -- It's horrifying to have an iPhone app that breaks since it takes so long to get approved -- I was frantically trying to sort out why it wasn't working last night so I'm glad we are close to resolution.

    One question: I know it's hard to predict how long it is to fix something but would you expect that you are able to push out a change today or will it be several days? (I'm not looking you to 'promise' anything, just give a general sense based on your experience)

    --John

  20. raghus3 years ago

    mikey: I hope the re-authentication issue is also going to be fixed

  21. mikey3 years ago

    I think the auth issue is also related..
    If I can figure this out, it can probably get fixed in a few hours.. I'll keep you all posted..

  22. raghus3 years ago

    awsome mikey. if you can just update this thread when you've pushed the fix out, i'll test it and report back

    thanks for everything

  23. mikey3 years ago

    hmm.. ugh, so far, I actually cannot duplicate your issues. I thought it was related to post, and then possibly something with the authorization header, but I can post to these exact calls as you all describe without issue..

    I'm investigating further..

    =-m-=

  24. raghus3 years ago

    I *just* tried 11:15 am PST and it *still* 404s on me

[ Page 1 of 2 | Next ]