{"id":1434,"date":"2019-11-12T14:36:11","date_gmt":"2019-11-12T14:36:11","guid":{"rendered":"http:\/\/127.0.0.1:8086\/?p=1434"},"modified":"2022-09-27T13:34:05","modified_gmt":"2022-09-27T13:34:05","slug":"654879915","status":"publish","type":"post","link":"https:\/\/deathbycaptcha.com\/blog\/tutorials-guides\/654879915","title":{"rendered":"Solving reCaptcha v2 and submitting via POST"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\"  style='background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;'><div class=\"fusion-builder-row fusion-row \"><div  class=\"fusion-layout-column fusion_builder_column fusion_builder_column_1_1  fusion-one-full fusion-column-first fusion-column-last 1_1\"  style='margin-top:0px;margin-bottom:0px;'>\n\t\t\t\t\t<div class=\"fusion-column-wrapper\" style=\"padding: 0px 0px 0px 0px;background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;\"  data-bg-url=\"\">\n\t\t\t\t\t\t<div class=\"fusion-text\"><p>As you may know our API for reCaptcha v2 requires a <strong>URL<\/strong>, a <strong>Sitekey<\/strong> and optionally a <strong>proxy<\/strong>, we will guide you on how to perform the whole captcha solving process and then show you how to use the token produced in a POST request to submit the form.<\/p>\n<p>We will start our <strong>test<\/strong> with the URL:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1437\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/url-00.png\" alt=\"\" width=\"414\" height=\"19\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/url-00-200x9.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/url-00-300x14.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/url-00-400x18.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/url-00.png 414w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/p>\n<p>This is a reCaptcha v2 <strong>demo<\/strong> page and it <strong>will simulate the Website<\/strong> which contains the reCatcha you want to solve. You already have the URL now we need to get the <strong>Sitekey<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1440 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/001.png\" alt=\"\" width=\"532\" height=\"423\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/001-177x142.png 177w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/001-200x158.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/001-400x317.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/001.png 681w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><\/p>\n<p>There are <strong>two ways<\/strong> to obtain the Sitekey, the first one is finding the <strong>\u201cdata-sitekey\u201d<\/strong> tag in the HTML of the page. The second one is finding the <strong>\u201ciframe\u201d<\/strong> tag. We will see how to find it both ways.<\/p>\n<p>First step is using the built-in <strong>\u201cInspect Element\u201d<\/strong> feature of your browser. Then find the <strong>\u201cdata-sitekey\u201d<\/strong> tag or the <strong>\u201ciframe\u201d<\/strong> tag, (there could be several in one site, make sure you are accessing the one for the reCaptcha), right click on it an select <strong>\u201cEdit as HTML\u201d<\/strong> after you\u2019ve done it you will be able to extract the Sitekey from it, follow the example in the pictures.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1441 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/01-1.png\" alt=\"\" width=\"402\" height=\"483\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/01-1-200x241.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/01-1-249x300.png 249w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/01-1-400x482.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/01-1.png 529w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/p>\n<p>a) Find iFrame tag<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1443 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1.png\" alt=\"\" width=\"497\" height=\"440\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1-200x177.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1-300x265.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1-400x353.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1-600x530.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/02-1.png 650w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>\n<p>b) Copy the Sitekey<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1444 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03.png\" alt=\"\" width=\"538\" height=\"474\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03-200x176.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03-300x264.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03-400x352.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03-600x528.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/03.png 654w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/p>\n<p>Now, you\u2019ve found your Sitekey and URL, it\u2019s time to save your parameters as a <strong>JSON file<\/strong>. If you are not using a proxy you can leave \u201cproxy\u201d and \u201cproxytype\u201d parameters empty as in the example.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1445 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/04.png\" alt=\"\" width=\"607\" height=\"328\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/04-200x107.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/04-300x161.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/04.png 865w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/p>\n<p>It\u2019s now time to make your API call; first make a <strong>POST<\/strong> request to the URL \u2018<strong>https:\/\/api.dbcapi.me\/api\/captcha<\/strong>\u2019 using your <strong>username<\/strong>, <strong>password<\/strong>, <strong>captcha type<\/strong> and recently created \u201c<em><strong>params.json<\/strong><\/em>\u201d file, finally send the request.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1402 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/07\/07-recaptcha_api_call.png\" alt=\"\" width=\"755\" height=\"335\" \/><\/p>\n<p>Now, you can find the response in your <strong>Previous Submissions<\/strong> page: https:\/\/deathbycaptcha.com\/user\/captchas<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1446 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/08.png\" alt=\"\" width=\"517\" height=\"270\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/08-200x103.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/08.png 574w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1447 aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/09.png\" alt=\"\" width=\"480\" height=\"454\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/09-200x189.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/09-300x283.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/09-400x378.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/09.png 559w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>Copy the text received and it&#8217;s time to make a second API request to submit the form of the website.<\/p>\n<p>The request needs to be a <strong>POST<\/strong> request with the fields name as parameters as well as the reCaptcha box ID, named <strong>g-recaptcha-response<\/strong> (which will accept the token produced by our API). That request needs to be made to the same <strong>URL<\/strong> that appears in the &#8216;<strong>action<\/strong>&#8216; attribute of the form.<\/p>\n<ol>\n<li><strong>URL:<\/strong><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1451 aligncenter\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11.png\" alt=\"\" width=\"705\" height=\"691\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11-66x66.png 66w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11-200x196.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11-300x294.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11-400x392.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11-600x588.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/11.png 767w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>2. <strong>Form fields name<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1448 aligncenter\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06.png\" alt=\"\" width=\"544\" height=\"500\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06-200x184.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06-300x276.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06-400x368.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06-600x552.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/06.png 657w\" sizes=\"auto, (max-width: 544px) 100vw, 544px\" \/><\/p>\n<p>3. <strong>ReCaptcha text field ID<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1449 aligncenter\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07.png\" alt=\"\" width=\"562\" height=\"534\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07-200x190.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07-300x285.png 300w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07-400x380.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07-600x570.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/07.png 688w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/p>\n<p><strong>And that&#8217;s it!<\/strong> That&#8217;s all which is required to start your API call and finally submit the form. Simply paste the token as the value for <strong>g-recaptcha-response<\/strong> and hit send.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1450 size-full aligncenter\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 5px;\" src=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10.png\" alt=\"\" width=\"780\" height=\"846\" srcset=\"https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10-200x217.png 200w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10-277x300.png 277w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10-400x434.png 400w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10-600x651.png 600w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10-768x833.png 768w, https:\/\/deathbycaptcha.com\/blog\/wp-content\/uploads\/2019\/11\/10.png 780w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div>\n\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[56],"tags":[],"class_list":["post-1434","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"_links":{"self":[{"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/posts\/1434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/comments?post=1434"}],"version-history":[{"count":6,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/posts\/1434\/revisions"}],"predecessor-version":[{"id":2310,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/posts\/1434\/revisions\/2310"}],"wp:attachment":[{"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/media?parent=1434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/categories?post=1434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deathbycaptcha.com\/blog\/wp-json\/wp\/v2\/tags?post=1434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}