#
hCaptcha
This API solves all versions of hCaptcha (Publisher, Pro, Enterprise).
hCaptcha Token API consumes 5 credits per POST request.
For hCaptcha Enterprise, we strongly suggest providing the proxy parameter. This should match the proxy that you use to submit the token because most sites will check that the IP used to solve the challenge matches the IP used to submit the token.
We do not yet support challenges that require drawing a box around an object.
#
Submit the CAPTCHA to NopeCHA
POST https://api.nopecha.com/token/
{
'key': 'MY_NOPECHA_KEY',
'type': 'hcaptcha',
'sitekey': 'b4c45857-0e23-48e6-9017-e28fff99ffb2',
'url': 'https://nopecha.com/demo/hcaptcha#easy',
'data': {
'rqdata': 'eyJ0eXAiOi...'
}
}
Retrieve solution with the data value
{
'data': 'PHN2ZyB3aWR0aD0'
}
#
Get the token from NopeCHA
GET https://api.nopecha.com/token/
{
'key': 'MY_NOPECHA_KEY',
'id': 'PHN2ZyB3aWR0aD0'
}
AI has generated the token
AI has not yet generated the token
{
'data': '03AEkXODDX8VLP-TmomOFDLEd33JLQDrVqb4Lb1lMeuvlCUjrYzIasAk-YQ...'
}
{
'error': 14,
'message': 'Incomplete job'
}
#
Example code using client libraries
# Install the client using the following command:
# pip install --upgrade nopecha
import nopecha
nopecha.api_key = 'YOUR_API_KEY'
# Call the Token API
token = nopecha.Token.solve(
type='hcaptcha',
sitekey='b4c45857-0e23-48e6-9017-e28fff99ffb2',
url='https://nopecha.com/demo/hcaptcha#easy',
proxy={
'scheme': 'http',
'host': '131.171.136.193',
'port': '7234',
'username': 'EhV1AVUbhK',
'password': 'DJ96p39v9z',
}
)
# Print the token
print(token)
// Install the client using the following command:
// npm i nopecha
const { Configuration, NopeCHAApi } = require('nopecha');
const configuration = new Configuration({
apiKey: 'YOUR_API_KEY',
});
const nopecha = new NopeCHAApi(configuration);
(async () => {
// Call the Token API
const token = await nopecha.solveToken({
type: 'hcaptcha',
sitekey: 'b4c45857-0e23-48e6-9017-e28fff99ffb2',
url: 'https://nopecha.com/demo/hcaptcha#easy',
proxy: {
scheme: 'http',
host: '131.171.136.193',
port: '7234',
username: 'EhV1AVUbhK',
password: 'DJ96p39v9z',
},
});
// Print the token
console.log(token);
})();