Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6933481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:50:16+00:00 2026-05-27T11:50:16+00:00

I have a simple Rails application with which I am trying to use the

  • 0

I have a simple Rails application with which I am trying to use the Netflix API to gain access to some of my subscriber information, such as my history and queue. My problem is that no matter what I do, Netflix will not use my oauth_callback url, but instead forwards me to the Netflix site after I authorize the application with my user credentials.

Here is the controller code which is making the request to the Netflix API

class ExportController < ApplicationController

  def export
    consumer = OAuth::Consumer.new( ENV['NETFLIX_KEY'],ENV['NETFLIX_SECRET'],
      :site => "http://api.netflix.com",
      :request_token_url => "http://api.netflix.com/oauth/request_token",
      :access_token_url => "http://api.netflix.com/oauth/access_token", 
      :authorize_url => "https://api-user.netflix.com/oauth/login" )
    request_token = consumer.get_request_token
    session[:request_token]=request_token
    session[:request_token_secret]=request_token.secret
    url = request_token.authorize_url( :oauth_callback => "http://#{ENV['OAUTH_CALLBACK_DOMAIN']}/export_callback/", :oauth_consumer_key => ENV['NETFLIX_KEY'],
      :application_name => ENV['APPLICATION_NAME'] )
    redirect_to url
  end

  def export_callback
    @request_token=OAuth::RequestToken.new(session[:request_token],session[:request_token_secret]) 
    @access_token = @request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])
  end
end

The controller correctly redirects to https://api-user.netflix.com/oauth/login site, with all the parameters correctly set. I get the Netflix Login/Authorize app page.

Netflix Link Account page

However, if I look at the source of this page, I see in the form that the oauth_callback field is set to oob

      <input type="hidden" name="oauth_callback" value="oob"/>

I’ve checked several different ways, and I am setting the oauth_callback parameter just the same as the Netflix Authentication Walkthrough. In fact, when I go through the walkthrough and put in my callback url in their field, it does in fact redirect back to my rails application.

So, my question, does anyone know how to make Netflix respect my oauth_callback field?

edit:

https://api-user.netflix.com/oauth/login?oauth_callback=http%3A%2F%2Fnetflix.dev%2Fexport_callback%2F&oauth_consumer_key=[REMOVED]&oauth_nonce=631831&oauth_timestamp=1321458391&application_name=[REMOVED]&oauth_token=[REMOVED]

You can see oauth_callback=http%3A%2F%2Fnetflix.dev%2Fexport_callback%2F being set, which is the route to my local rails app.

edit2:

I am using the oauth (0.4.5) and rails (3.1.0) and ruby-1.9.2-p290 [ x86_64 ] on Mac OS X 10.6.8.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:50:17+00:00Added an answer on May 27, 2026 at 11:50 am

    The oob that is in the form probably refers to “out of bounds”. The problem is with:

    request_token = consumer.get_request_token
    

    Netflix makes you pass in the callback url when you get the request token, and verifies the url in the login page. In your case, if you change it to:

    request_token = consumer.get_request_token( 
              :oauth_callback => 
                 "http://#{ENV['OAUTH_CALLBACK_DOMAIN']}/export_callback/" )
    

    Everything should work from that point on, and the form will get this value. I tested out your code, and got the same oob and then added the change, and it gave the correct value in the form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple rails application in which I'm trying to add a very
I have a simple rails 2.3.4 application I am trying to get running with
I have created a simple blog application with Ruby on Rails. The applications consists
I have built a very simple blog application using Ruby on Rails. New to
I have a simple Ruby on Rails form which includes an authenticity_token. Unfortunatly, I
I'm trying to get tags working in my rails application and want to use
We have some code that must access low level windows XP os calls which
I am experimenting with a design for a Rails application which will have most
I have two databases in use in a Ruby on Rails application; one is
I have a simple Twitter mockup set up following rails tutorial and I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.