I'm trying to set up Rturk to outsource some work to Amazon's Mechanical Turk. When I try to create my HITs
, I keep running into t he following error in console:
RestClient::BadRequest: 400 Bad Request
When I copy the URL and paste it in my browser to get the response, I get the following message:
This user is not authorized to perform the requested operation
Do you guys have any idea what could be happening here? I am following the rturk documentation on github. https://github.com/mdp/rturk Is it possible that the gem has to be updated?
RTurk.setup(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY_ID'], :sandbox => true)
hit = RTurk::Hit.create(
:title => "Sample turk",
:assignments_duration => 1.hour,
:expires_at => 1.day.from_now
) do |hit|
hit.lifetime = 1.day
hit.assignments = 1
hit.description = "Test description."
hit.keywords = "places, search, map, location"
hit.question(mturk-fb_path, :frame_height => 750)
hit.reward = reward
if approval_rate
hit.qualifications.add :approval_rate, { :gt => approval_rate }
end if abandoned_rate
hit.qualifications.add :abandoned_rate, { :lt => abandoned_rate }
end
if is_us
hit.qualifications.add :country, { :eql => "US" }
end
end
}