utmvc
utmvc is Incapsula’s older challenge. Most sites no longer use it, but some still do.
Do you need it?
Section titled “Do you need it?”You need it when the blocked page is almost empty and loads an _Incapsula_Resource script:
<html><head><META NAME="robots" CONTENT="noindex,nofollow"><script src="/_Incapsula_Resource?SWJIYLWA=5074a744e2e3d891814e9a2dace20bd4,719d34d31c8e3a6e6fffd425f7e032f3"></script><body></body></html>-
GET the script
srcfrom the page. It differs per site, so read it from the page. -
Base64-encode the script and send it to us, with the values of your
incap_ses_*cookies:Terminal window curl -X POST https://incap.antibotapi.com/utmvc \-H "x-api-key: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"script": "<base64 of the script>","session_cookies": ["<value of each incap_ses_* cookie>"]}'You get back
___utmvcandSWHANEDL. -
If
SWHANEDLis not empty, GET/_Incapsula_Resource?SWHANEDL=<SWHANEDL>on the site. -
Add the
___utmvccookie to your jar. -
GET
/_Incapsula_Resource?SWKMTFSR=1&e=<random>, where<random>is a random number between 0 and 1 with 15 decimal places (whatMath.random()gives). A body of1means the cookie was accepted. -
Retry the blocked request.
All fields are in the API reference.