Obtaining Worker ID from MTurk Using React

147 Views Asked by At

I have built a web app using React and want to be able to capture the worker ID. Is there a way to do this with React?

1

There are 1 best solutions below

0
Trenton On

Your React code will run in an iframe. The iframe URL will look like this:

https://www.mturkcontent.com/dynamic/hit?assignmentId=382M90RTU7DNS1COHERG0VIJ7IGUEQ&hitId=DX6EGJKFBK3NSCTNUR39O8F69WRA5J&workerId=A3IWRVNFT1T83W&turkSubmitTo=https%3A%2F%2Fwww.mturk.com

You can retrieve the worker id from the query string. It's A3IWRVNFT1T83W in this example.