<!doctype html><htmllang=en-us><head><metacharset=utf-8><metahttp-equiv=x-ua-compatiblecontent="ie=edge"><metaname=viewportcontent="width=device-width,initial-scale=1,shrink-to-fit=no"><linkrel=preloadas=fonthref=/fonts/vendor/jost/jost-v4-latin-regular.woff2type=font/woff2crossorigin><linkrel=preloadas=fonthref=/fonts/vendor/jost/jost-v4-latin-700.woff2type=font/woff2crossorigin><linkrel=stylesheethref=/main.f4e82f75f039986a07346a99687f11e3218d588abe9b9daa7d0673b1a7aaee5b689ec69619c26a2962d5a124bed33807d58bd84180c249bbb8eddc33c5ef5baa.cssintegrity="sha512-9OgvdfA5mGoHNGqZaH8R4yGNWIq+m52qfQZzsaeq7ltonsaWGcJqKWLVoSS+0zgH1YvYQYDCSbu47dwzxe9bqg=="crossorigin=anonymous><noscript><style>img.lazyload{display:none}</style></noscript><metaname=robotscontent="index, follow"><metaname=googlebotcontent="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><metaname=bingbotcontent="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><title>Access token - mCaptcha</title><metaname=descriptioncontent="mCaptcha implements leaky bucket algorithm to measure current traffic levels. Cooldown period specifies the leak or the time after which a visitor addition is decremented."><linkrel=canonicalhref=/docs/terminology/access-token/><metaname=twitter:cardcontent="summary_large_image"><metaname=twitter:imagecontent="/icon.png"><metaname=twitter:titlecontent="Access token"><metaname=twitter:descriptioncontent="mCaptcha implements leaky bucket algorithm to measure current traffic levels. Cooldown period specifies the leak or the time after which a visitor addition is decremented."><metaname=twitter:sitecontent="@"><metaname=twitter:creatorcontent="@"><metaproperty="og:title"content="Access token"><metaproperty="og:description"content="mCaptcha implements leaky bucket algorithm to measure current traffic levels. Cooldown period specifies the leak or the time after which a visitor addition is decremented."><metaproperty="og:type"content="article"><metaproperty="og:url"content="/docs/terminology/access-token/"><metaproperty="og:image"content="/icon.png"><metaproperty="article:published_time"content="2022-07-22T00:00:00+00:00"><metaproperty="article:modified_time"content="2022-08-01T22:27:01+05:30"><metaproperty="og:site_name"content="mCaptcha"><metaproperty="article:publisher"content="https://www.facebook.com/"><metaproperty="article:author"content="https://www.facebook.com/"><metaproperty="og:locale"content="en_US"><scripttype=application/ld+json>{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"\/"},{"@type":"ListItem","position":2,"name":"Docsterminologyaccess Token","item":"\/docsterminologyaccess-token\/"}]}</script><metaname=theme-colorcontent="#fff"><linkrel=apple-touch-iconsizes=180x180href=/apple-touch-icon.png><linkrel=icontype=image/pngsizes=32x32href=/favicon-32x32.png><linkrel=icontype=image/pngsizes=16x16href=/favicon-16x16.png><linkrel=manifesthref=/site.webmanifest></head><bodyclass="docs single"><divclass="header-bar fixed-top"></div><headerclass="navbar fixed-top navbar-expand-md navbar-light"><divclass=container><inputclass="menu-btn order-0"type=checkboxid=menu-btn>
mCaptcha instance, the solution will be verified for correctness. If the
solution is correct, mCaptcha will return a single use access token.</p><p>This access token should be attached to the visitor’s requited to the
protected service and the protected service should validity of the
access token with the mCaptcha instance and only allow access to
protected resource if the access token is valid.</p><h2id=validate-access-token>Validate access token:<ahref=#validate-access-tokenclass=anchoraria-hidden=true>#</a></h2><divclass=highlight><prestyle=color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><codeclass=language-bashdata-lang=bash><spanstyle="margin-right:.4em;padding:0 .4em;color:#7f7f7f">1</span>curl --location --request POST <spanstyle=color:#f1fa8c>'https://mcaptcha.example.net/api/v1/pow/siteverify'</span><spanstyle=color:#f1fa8c>\
</span><spanstyle="margin-right:.4em;padding:0 .4em;color:#7f7f7f">4</span><spanstyle=color:#f1fa8c>"token": "replace this with the access token presented by visitor",
</span><spanstyle="margin-right:.4em;padding:0 .4em;color:#7f7f7f">5</span><spanstyle=color:#f1fa8c>"key": "replace this with the sitekey associated with the CAPTCHA"
</span><spanstyle="margin-right:.4em;padding:0 .4em;color:#7f7f7f">6</span><spanstyle=color:#f1fa8c>"secret": "replace this with mCaptcha account secret, available in settings"